<!DOCTYPE html>
<!-- saved from url=(0056)https://blog.csdn.net/hancoder/article/details/118233786 -->
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    
    <link rel="canonical" href="https://blog.csdn.net/hancoder/article/details/118233786">
    
    <meta name="renderer" content="webkit">
    <meta name="force-rendering" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="report" content="{&quot;pid&quot;: &quot;blog&quot;, &quot;spm&quot;:&quot;1001.2101&quot;}">
    <meta name="referrer" content="always">
    <meta http-equiv="Cache-Control" content="no-siteapp"><link rel="alternate" media="handheld" href="https://blog.csdn.net/hancoder/article/details/118233786#">
    <meta name="shenma-site-verification" content="5a59773ab8077d4a62bf469ab966a63b_1497598848">
    <meta name="applicable-device" content="pc">
    <link href="https://g.csdnimg.cn/static/logo/favicon32.ico" rel="shortcut icon" type="image/x-icon">
    <title>【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客</title>
    <script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/f(5).txt"></script><script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/f(6).txt" id="google_shimpl"></script><script type="text/javascript" async="" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/auto_dup"></script><script type="text/javascript" charset="utf-8" async="" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/apiaccept"></script><script type="text/javascript" async="" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/trackad.js"></script><script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/push.js"></script><script type="text/javascript" async="" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/saved_resource"></script><script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/hm.js"></script><script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/push(1).js" id="ttzz"></script><script>
      (function(){ 
        var el = document.createElement("script"); 
        el.src = "https://s3a.pstatp.com/toutiao/push.js?1abfa13dfe74d72d41d83c86d240de427e7cac50c51ead53b2e79d40c7952a23ed7716d05b4a0f683a653eab3e214672511de2457e74e99286eb2c33f4428830"; 
        el.id = "ttzz"; 
        var s = document.getElementsByTagName("script")[0]; 
        s.parentNode.insertBefore(el, s);
      })(window)
    </script>
        <meta name="keywords" content="【Jenkins】持续集成环境实战">
        <meta name="csdn-baidu-search" content="{&quot;autorun&quot;:true,&quot;install&quot;:true,&quot;keyword&quot;:&quot;【Jenkins】持续集成环境实战&quot;}">
    <meta name="description" content="《Jenkins持续集成入门到精通》1、持续集成及Jenkins介绍2、Jenkins安装和持续集成环境配置3、Jenkins构建Maven项目4、Jenkins+Docker+SpringCloud微服务持续集成5、基于Kubernetes/K8S构建Jenkins微服务持续集成平台一、持续集成及Jenkins介绍软件开发生命周期软件开发生命周期又叫做SDLC（Software Development Life Cycle），它是集合了计划、开发、测试和部署过程的集合。如下图所示  ： ">
    <script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/blog.js" type="text/javascript"></script>
        <link rel="stylesheet" type="text/css" href="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/detail_enter-ec789632bc.min.css">
    <style>
        #content_views pre{
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            -khtml-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none; 
            user-select: none; 
        }
        #content_views pre code{
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            -khtml-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none; 
            user-select: none; 
        }
    </style>
    <script type="application/ld+json">{"@context":"https://ziyuan.baidu.com/contexts/cambrian.jsonld","@id":"https://blog.csdn.net/hancoder/article/details/118233786","appid":"1638831770136827","pubDate":"2021-06-26T03:09:56","title":"【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客","upDate":"2021-06-26T03:10:49"}</script>
        <link rel="stylesheet" type="text/css" href="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/skin-cat-d114b9ac23.min.css">
    <script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        var isCorporate = false;//注释删除enterprise
        var username =  "hancoder";
        var skinImg = "white";
        var blog_address = "https://blog.csdn.net/hancoder";
        var currentUserName = "";
        var isOwner = false;
        var loginUrl = "http://passport.csdn.net/account/login?from=https://blog.csdn.net/hancoder/article/details/118233786";
        var blogUrl = "https://blog.csdn.net/";
        var avatar = "https://profile.csdnimg.cn/D/F/4/3_hancoder";
        var articleTitle = "【Jenkins】持续集成环境实战";
        var articleDesc = "《Jenkins持续集成入门到精通》1、持续集成及Jenkins介绍2、Jenkins安装和持续集成环境配置3、Jenkins构建Maven项目4、Jenkins+Docker+SpringCloud微服务持续集成5、基于Kubernetes/K8S构建Jenkins微服务持续集成平台一、持续集成及Jenkins介绍软件开发生命周期软件开发生命周期又叫做SDLC（Software Development Life Cycle），它是集合了计划、开发、测试和部署过程的集合。如下图所示  ： ";
        var articleTitles = "【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客";
        var nickName = "hancoder";
        var articleDetailUrl = "https://blog.csdn.net/hancoder/article/details/118233786";
        if(window.location.host.split('.').length == 3) {
            blog_address = blogUrl + username;
        }
        var skinStatus = "White";
        var blogStaticHost = "https://csdnimg.cn/release/blogv2/"
    </script>
    <script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/saved_resource(1)" type="text/javascript"></script>
    <script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/report.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/sandalstrap.min.css">
    <style>
        .MathJax, .MathJax_Message, .MathJax_Preview{
            display: none
        }
    </style>
    <script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/ds.js"></script>
<link rel="stylesheet" type="text/css" href="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/csdn-toolbar-default.css"><link rel="stylesheet" type="text/css" href="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/user-login.css"><link rel="stylesheet" type="text/css" href="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/collection-box.css"><link rel="stylesheet" type="text/css" href="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/user-tooltip.css"><link rel="stylesheet" type="text/css" href="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/user-medal.css"><style type="text/css">.hljs-ln{border-collapse:collapse}            .hljs-ln td{padding:0}            .hljs-ln-n{text-align: right;padding-right: 8px;}            .hljs-ln-n:before{content:attr(data-line-number)}</style><style type="text/css">pre{position: relative}pre:hover .code-full-screen{display:none !important;}.code-full-screen{display: none !important;position: absolute;right: 4px;top: 3px;width: 24px !important;height: 24px !important;margin: 4px !important;}pre:hover .hljs-button{display: block}.hljs-button{display: none;position: absolute;right: 4px;top: 4px;font-size: 12px;color: #ffffff;background-color: #9999AA;padding: 2px 8px;margin: 8px;border-radius: 4px;cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.05);}.hljs-button:after{content: attr(data-title)}code .hljs-button{margin: 2px 8px;}</style><link rel="stylesheet" type="text/css" href="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/user-ordertip.css"><link rel="stylesheet" type="text/css" href="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/order-payment.css"><link rel="stylesheet" type="text/css" href="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/side-toolbar.css"><link rel="stylesheet" type="text/css" href="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/csdn-footer.css"><style type="text/css">.MathJax_Hover_Frame {border-radius: .25em; -webkit-border-radius: .25em; -moz-border-radius: .25em; -khtml-border-radius: .25em; box-shadow: 0px 0px 15px #83A; -webkit-box-shadow: 0px 0px 15px #83A; -moz-box-shadow: 0px 0px 15px #83A; -khtml-box-shadow: 0px 0px 15px #83A; border: 1px solid #A6D ! important; display: inline-block; position: absolute}
.MathJax_Menu_Button .MathJax_Hover_Arrow {position: absolute; cursor: pointer; display: inline-block; border: 2px solid #AAA; border-radius: 4px; -webkit-border-radius: 4px; -moz-border-radius: 4px; -khtml-border-radius: 4px; font-family: 'Courier New',Courier; font-size: 9px; color: #F0F0F0}
.MathJax_Menu_Button .MathJax_Hover_Arrow span {display: block; background-color: #AAA; border: 1px solid; border-radius: 3px; line-height: 0; padding: 4px}
.MathJax_Hover_Arrow:hover {color: white!important; border: 2px solid #CCC!important}
.MathJax_Hover_Arrow:hover span {background-color: #CCC!important}
</style><style type="text/css">#MathJax_About {position: fixed; left: 50%; width: auto; text-align: center; border: 3px outset; padding: 1em 2em; background-color: #DDDDDD; color: black; cursor: default; font-family: message-box; font-size: 120%; font-style: normal; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; z-index: 201; border-radius: 15px; -webkit-border-radius: 15px; -moz-border-radius: 15px; -khtml-border-radius: 15px; box-shadow: 0px 10px 20px #808080; -webkit-box-shadow: 0px 10px 20px #808080; -moz-box-shadow: 0px 10px 20px #808080; -khtml-box-shadow: 0px 10px 20px #808080; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
#MathJax_About.MathJax_MousePost {outline: none}
.MathJax_Menu {position: absolute; background-color: white; color: black; width: auto; padding: 2px; border: 1px solid #CCCCCC; margin: 0; cursor: default; font: menu; text-align: left; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; z-index: 201; box-shadow: 0px 10px 20px #808080; -webkit-box-shadow: 0px 10px 20px #808080; -moz-box-shadow: 0px 10px 20px #808080; -khtml-box-shadow: 0px 10px 20px #808080; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
.MathJax_MenuItem {padding: 2px 2em; background: transparent}
.MathJax_MenuArrow {position: absolute; right: .5em; padding-top: .25em; color: #666666; font-size: .75em}
.MathJax_MenuActive .MathJax_MenuArrow {color: white}
.MathJax_MenuArrow.RTL {left: .5em; right: auto}
.MathJax_MenuCheck {position: absolute; left: .7em}
.MathJax_MenuCheck.RTL {right: .7em; left: auto}
.MathJax_MenuRadioCheck {position: absolute; left: 1em}
.MathJax_MenuRadioCheck.RTL {right: 1em; left: auto}
.MathJax_MenuLabel {padding: 2px 2em 4px 1.33em; font-style: italic}
.MathJax_MenuRule {border-top: 1px solid #CCCCCC; margin: 4px 1px 0px}
.MathJax_MenuDisabled {color: GrayText}
.MathJax_MenuActive {background-color: Highlight; color: HighlightText}
.MathJax_MenuDisabled:focus, .MathJax_MenuLabel:focus {background-color: #E8E8E8}
.MathJax_ContextMenu:focus {outline: none}
.MathJax_ContextMenu .MathJax_MenuItem:focus {outline: none}
#MathJax_AboutClose {top: .2em; right: .2em}
.MathJax_Menu .MathJax_MenuClose {top: -10px; left: -10px}
.MathJax_MenuClose {position: absolute; cursor: pointer; display: inline-block; border: 2px solid #AAA; border-radius: 18px; -webkit-border-radius: 18px; -moz-border-radius: 18px; -khtml-border-radius: 18px; font-family: 'Courier New',Courier; font-size: 24px; color: #F0F0F0}
.MathJax_MenuClose span {display: block; background-color: #AAA; border: 1.5px solid; border-radius: 18px; -webkit-border-radius: 18px; -moz-border-radius: 18px; -khtml-border-radius: 18px; line-height: 0; padding: 8px 0 6px}
.MathJax_MenuClose:hover {color: white!important; border: 2px solid #CCC!important}
.MathJax_MenuClose:hover span {background-color: #CCC!important}
.MathJax_MenuClose:hover:focus {outline: none}
</style><style type="text/css">.MathJax_Preview .MJXf-math {color: inherit!important}
</style><style type="text/css">.MJX_Assistive_MathML {position: absolute!important; top: 0; left: 0; clip: rect(1px, 1px, 1px, 1px); padding: 1px 0 0 0!important; border: 0!important; height: 1px!important; width: 1px!important; overflow: hidden!important; display: block!important; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none}
.MJX_Assistive_MathML.MJX_Assistive_MathML_Block {width: 100%!important}
</style><style type="text/css">#MathJax_Zoom {position: absolute; background-color: #F0F0F0; overflow: auto; display: block; z-index: 301; padding: .5em; border: 1px solid black; margin: 0; font-weight: normal; font-style: normal; text-align: left; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; box-shadow: 5px 5px 15px #AAAAAA; -webkit-box-shadow: 5px 5px 15px #AAAAAA; -moz-box-shadow: 5px 5px 15px #AAAAAA; -khtml-box-shadow: 5px 5px 15px #AAAAAA; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
#MathJax_ZoomOverlay {position: absolute; left: 0; top: 0; z-index: 300; display: inline-block; width: 100%; height: 100%; border: 0; padding: 0; margin: 0; background-color: white; opacity: 0; filter: alpha(opacity=0)}
#MathJax_ZoomFrame {position: relative; display: inline-block; height: 0; width: 0}
#MathJax_ZoomEventTrap {position: absolute; left: 0; top: 0; z-index: 302; display: inline-block; border: 0; padding: 0; margin: 0; background-color: white; opacity: 0; filter: alpha(opacity=0)}
</style><style type="text/css">.MathJax_Preview {color: #888}
#MathJax_Message {position: fixed; left: 1em; bottom: 1.5em; background-color: #E6E6E6; border: 1px solid #959595; margin: 0px; padding: 2px 8px; z-index: 102; color: black; font-size: 80%; width: auto; white-space: nowrap}
#MathJax_MSIE_Frame {position: absolute; top: 0; left: 0; width: 0px; z-index: 101; border: 0px; margin: 0px; padding: 0px}
.MathJax_Error {color: #CC0000; font-style: italic}
</style><meta http-equiv="origin-trial" content="AxujKG9INjsZ8/gUq8+dTruNvk7RjZQ1oFhhgQbcTJKDnZfbzSTE81wvC2Hzaf3TW4avA76LTZEMdiedF1vIbA4AAABueyJvcmlnaW4iOiJodHRwczovL2ltYXNkay5nb29nbGVhcGlzLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzVGhpcmRQYXJ0eSI6dHJ1ZX0="><meta http-equiv="origin-trial" content="Azuce85ORtSnWe1MZDTv68qpaW3iHyfL9YbLRy0cwcCZwVnePnOmkUJlG8HGikmOwhZU22dElCcfrfX2HhrBPAkAAAB7eyJvcmlnaW4iOiJodHRwczovL2RvdWJsZWNsaWNrLm5ldDo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9"><meta http-equiv="origin-trial" content="A16nvcdeoOAqrJcmjLRpl1I6f3McDD8EfofAYTt/P/H4/AWwB99nxiPp6kA0fXoiZav908Z8etuL16laFPUdfQsAAACBeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9"><meta http-equiv="origin-trial" content="AxBHdr0J44vFBQtZUqX9sjiqf5yWZ/OcHRcRMN3H9TH+t90V/j3ENW6C8+igBZFXMJ7G3Pr8Dd13632aLng42wgAAACBeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXN5bmRpY2F0aW9uLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9"><meta http-equiv="origin-trial" content="A88BWHFjcawUfKU3lIejLoryXoyjooBXLgWmGh+hNcqMK44cugvsI5YZbNarYvi3roc1fYbHA1AVbhAtuHZflgEAAAB2eyJvcmlnaW4iOiJodHRwczovL2dvb2dsZS5jb206NDQzIiwiZmVhdHVyZSI6IlRydXN0VG9rZW5zIiwiZXhwaXJ5IjoxNjUyNzc0NDAwLCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="><meta http-equiv="origin-trial" content="A/OOU4XAFfeAV4kM4+W9WBwNAHqq/bvtrRcJ1wpnNyO/i076BSUy1d14l2kBEgVmEuvxojSpD23172C6hBg2AQYAAACWeyJvcmlnaW4iOiJodHRwczovL2RvdWJsZWNsaWNrLm5ldDo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjM0MDgzMTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlLCJ1c2FnZSI6InN1YnNldCJ9"><meta http-equiv="origin-trial" content="AwrB+XVH/KV6HfZNVtSEqlUJi3yUbtCp0/TJRj+38NDIw19/9P1h7ECTtdLdhIzG0Bsl4n/0rVmttJtGUCcewgAAAACceyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXN5bmRpY2F0aW9uLmNvbTo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjM0MDgzMTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlLCJ1c2FnZSI6InN1YnNldCJ9"><meta http-equiv="origin-trial" content="Ax15QOERqai2A5XWrDY38Eg07xh2T0pkhpDPJuDlxr7D2Ka8wHvklgK7tTPZOnT+8H31lwHto5JpvYV8jRn1WgIAAACceyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjM0MDgzMTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlLCJ1c2FnZSI6InN1YnNldCJ9"><meta http-equiv="origin-trial" content="AxujKG9INjsZ8/gUq8+dTruNvk7RjZQ1oFhhgQbcTJKDnZfbzSTE81wvC2Hzaf3TW4avA76LTZEMdiedF1vIbA4AAABueyJvcmlnaW4iOiJodHRwczovL2ltYXNkay5nb29nbGVhcGlzLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzVGhpcmRQYXJ0eSI6dHJ1ZX0="><meta http-equiv="origin-trial" content="Azuce85ORtSnWe1MZDTv68qpaW3iHyfL9YbLRy0cwcCZwVnePnOmkUJlG8HGikmOwhZU22dElCcfrfX2HhrBPAkAAAB7eyJvcmlnaW4iOiJodHRwczovL2RvdWJsZWNsaWNrLm5ldDo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9"><meta http-equiv="origin-trial" content="A16nvcdeoOAqrJcmjLRpl1I6f3McDD8EfofAYTt/P/H4/AWwB99nxiPp6kA0fXoiZav908Z8etuL16laFPUdfQsAAACBeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9"><meta http-equiv="origin-trial" content="AxBHdr0J44vFBQtZUqX9sjiqf5yWZ/OcHRcRMN3H9TH+t90V/j3ENW6C8+igBZFXMJ7G3Pr8Dd13632aLng42wgAAACBeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXN5bmRpY2F0aW9uLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9"><meta http-equiv="origin-trial" content="A88BWHFjcawUfKU3lIejLoryXoyjooBXLgWmGh+hNcqMK44cugvsI5YZbNarYvi3roc1fYbHA1AVbhAtuHZflgEAAAB2eyJvcmlnaW4iOiJodHRwczovL2dvb2dsZS5jb206NDQzIiwiZmVhdHVyZSI6IlRydXN0VG9rZW5zIiwiZXhwaXJ5IjoxNjUyNzc0NDAwLCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="><meta http-equiv="origin-trial" content="A/OOU4XAFfeAV4kM4+W9WBwNAHqq/bvtrRcJ1wpnNyO/i076BSUy1d14l2kBEgVmEuvxojSpD23172C6hBg2AQYAAACWeyJvcmlnaW4iOiJodHRwczovL2RvdWJsZWNsaWNrLm5ldDo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjM0MDgzMTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlLCJ1c2FnZSI6InN1YnNldCJ9"><meta http-equiv="origin-trial" content="AwrB+XVH/KV6HfZNVtSEqlUJi3yUbtCp0/TJRj+38NDIw19/9P1h7ECTtdLdhIzG0Bsl4n/0rVmttJtGUCcewgAAAACceyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXN5bmRpY2F0aW9uLmNvbTo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjM0MDgzMTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlLCJ1c2FnZSI6InN1YnNldCJ9"><meta http-equiv="origin-trial" content="Ax15QOERqai2A5XWrDY38Eg07xh2T0pkhpDPJuDlxr7D2Ka8wHvklgK7tTPZOnT+8H31lwHto5JpvYV8jRn1WgIAAACceyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjM0MDgzMTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlLCJ1c2FnZSI6InN1YnNldCJ9"><style type="text/css">.MJXp-script {font-size: .8em}
.MJXp-right {-webkit-transform-origin: right; -moz-transform-origin: right; -ms-transform-origin: right; -o-transform-origin: right; transform-origin: right}
.MJXp-bold {font-weight: bold}
.MJXp-italic {font-style: italic}
.MJXp-scr {font-family: MathJax_Script,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-frak {font-family: MathJax_Fraktur,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-sf {font-family: MathJax_SansSerif,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-cal {font-family: MathJax_Caligraphic,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-mono {font-family: MathJax_Typewriter,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-largeop {font-size: 150%}
.MJXp-largeop.MJXp-int {vertical-align: -.2em}
.MJXp-math {display: inline-block; line-height: 1.2; text-indent: 0; font-family: 'Times New Roman',Times,STIXGeneral,serif; white-space: nowrap; border-collapse: collapse}
.MJXp-display {display: block; text-align: center; margin: 1em 0}
.MJXp-math span {display: inline-block}
.MJXp-box {display: block!important; text-align: center}
.MJXp-box:after {content: " "}
.MJXp-rule {display: block!important; margin-top: .1em}
.MJXp-char {display: block!important}
.MJXp-mo {margin: 0 .15em}
.MJXp-mfrac {margin: 0 .125em; vertical-align: .25em}
.MJXp-denom {display: inline-table!important; width: 100%}
.MJXp-denom > * {display: table-row!important}
.MJXp-surd {vertical-align: top}
.MJXp-surd > * {display: block!important}
.MJXp-script-box > *  {display: table!important; height: 50%}
.MJXp-script-box > * > * {display: table-cell!important; vertical-align: top}
.MJXp-script-box > *:last-child > * {vertical-align: bottom}
.MJXp-script-box > * > * > * {display: block!important}
.MJXp-mphantom {visibility: hidden}
.MJXp-munderover {display: inline-table!important}
.MJXp-over {display: inline-block!important; text-align: center}
.MJXp-over > * {display: block!important}
.MJXp-munderover > * {display: table-row!important}
.MJXp-mtable {vertical-align: .25em; margin: 0 .125em}
.MJXp-mtable > * {display: inline-table!important; vertical-align: middle}
.MJXp-mtr {display: table-row!important}
.MJXp-mtd {display: table-cell!important; text-align: center; padding: .5em 0 0 .5em}
.MJXp-mtr > .MJXp-mtd:first-child {padding-left: 0}
.MJXp-mtr:first-child > .MJXp-mtd {padding-top: 0}
.MJXp-mlabeledtr {display: table-row!important}
.MJXp-mlabeledtr > .MJXp-mtd:first-child {padding-left: 0}
.MJXp-mlabeledtr:first-child > .MJXp-mtd {padding-top: 0}
.MJXp-merror {background-color: #FFFF88; color: #CC0000; border: 1px solid #CC0000; padding: 1px 3px; font-style: normal; font-size: 90%}
.MJXp-scale0 {-webkit-transform: scaleX(.0); -moz-transform: scaleX(.0); -ms-transform: scaleX(.0); -o-transform: scaleX(.0); transform: scaleX(.0)}
.MJXp-scale1 {-webkit-transform: scaleX(.1); -moz-transform: scaleX(.1); -ms-transform: scaleX(.1); -o-transform: scaleX(.1); transform: scaleX(.1)}
.MJXp-scale2 {-webkit-transform: scaleX(.2); -moz-transform: scaleX(.2); -ms-transform: scaleX(.2); -o-transform: scaleX(.2); transform: scaleX(.2)}
.MJXp-scale3 {-webkit-transform: scaleX(.3); -moz-transform: scaleX(.3); -ms-transform: scaleX(.3); -o-transform: scaleX(.3); transform: scaleX(.3)}
.MJXp-scale4 {-webkit-transform: scaleX(.4); -moz-transform: scaleX(.4); -ms-transform: scaleX(.4); -o-transform: scaleX(.4); transform: scaleX(.4)}
.MJXp-scale5 {-webkit-transform: scaleX(.5); -moz-transform: scaleX(.5); -ms-transform: scaleX(.5); -o-transform: scaleX(.5); transform: scaleX(.5)}
.MJXp-scale6 {-webkit-transform: scaleX(.6); -moz-transform: scaleX(.6); -ms-transform: scaleX(.6); -o-transform: scaleX(.6); transform: scaleX(.6)}
.MJXp-scale7 {-webkit-transform: scaleX(.7); -moz-transform: scaleX(.7); -ms-transform: scaleX(.7); -o-transform: scaleX(.7); transform: scaleX(.7)}
.MJXp-scale8 {-webkit-transform: scaleX(.8); -moz-transform: scaleX(.8); -ms-transform: scaleX(.8); -o-transform: scaleX(.8); transform: scaleX(.8)}
.MJXp-scale9 {-webkit-transform: scaleX(.9); -moz-transform: scaleX(.9); -ms-transform: scaleX(.9); -o-transform: scaleX(.9); transform: scaleX(.9)}
.MathJax_PHTML .noError {vertical-align: ; font-size: 90%; text-align: left; color: black; padding: 1px 3px; border: 1px solid}
</style><link rel="preload" href="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/f(7).txt" as="script"><script type="text/javascript" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/f(7).txt"></script></head>
<body class="nodata " style=""><div id="MathJax_Message" style="display: none;"></div><div id="csdn-toolbar" style="position: fixed; top: 0px; left: 0px; z-index: 1993; width: 100%;">
                    <div class="toolbar-inside">
                      <div class="toolbar-container">
                        <div class="toolbar-container-left">
                          <div class="toolbar-logo toolbar-subMenu-box csdn-toolbar-fl"><a data-report-click="{&quot;spm&quot;:&quot;3001.4476&quot;}" data-report-query="spm=3001.4476" href="https://www.csdn.net/"><img title="CSDN首页" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20201124032511.png"></a>
                    </div>
                          <ul class="toolbar-menus csdn-toolbar-fl"><li class="active " title="阅读深度、前沿文章">
                                <a data-report-click="{&quot;mod&quot;:&quot;popu_336&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/&quot;,&quot;spm&quot;:&quot;3001.4477&quot;}" data-report-query="spm=3001.4477" href="https://blog.csdn.net/">
                                  博客
                                  
                                  
                                </a>
                                
                                
                              </li><li class="" title="马上开始系统学习">
                                <a data-report-click="{&quot;mod&quot;:&quot;popu_336&quot;,&quot;dest&quot;:&quot;https://edu.csdn.net/&quot;,&quot;spm&quot;:&quot;3001.4482&quot;}" data-report-query="spm=3001.4482" href="https://edu.csdn.net/">
                                  专栏课程
                                  
                                  
                                </a>
                                
                                
                              </li><li class="" title="获取源码、文档、学习资源">
                                <a data-report-click="{&quot;mod&quot;:&quot;popu_336&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/&quot;,&quot;spm&quot;:&quot;3001.4483&quot;}" data-report-query="spm=3001.4483" href="https://download.csdn.net/">
                                  下载
                                  
                                  
                                </a>
                                
                                
                              </li><li class="" title="技术问题，有问必答">
                                <a data-report-click="{&quot;mod&quot;:&quot;popu_336&quot;,&quot;dest&quot;:&quot;https://ask.csdn.net/&quot;,&quot;spm&quot;:&quot;3001.4492&quot;}" data-report-query="spm=3001.4492" href="https://ask.csdn.net/">
                                  问答
                                  
                                  
                                </a>
                                
                                
                              </li><li class="" title="找到志同道合的伙伴">
                                <a data-report-click="{&quot;mod&quot;:&quot;popu_336&quot;,&quot;dest&quot;:&quot;https://bbs.csdn.net/&quot;,&quot;spm&quot;:&quot;3001.6068&quot;}" data-report-query="spm=3001.6068" href="https://bbs.csdn.net/">
                                  社区
                                  
                                  
                                </a>
                                
                                
                              </li><li class="" title="安装你的浏览器助手">
                                <a data-report-click="{&quot;spm&quot;:&quot;3001.6135&quot;,&quot;dist&quot;:&quot; https://plugin.csdn.net/?utm_source=toolbar&quot;}" data-report-query="spm=3001.6135" href="https://plugin.csdn.net/?utm_source=toolbar">
                                  插件
                                  
                                  
                                </a>
                                
                                
                              </li><li class="" title="认证你的技术能力">
                                <a data-report-click="{&quot;mod&quot;:&quot;popu_336&quot;,&quot;dest&quot;:&quot;https://ac.csdn.net/?short_code=13271b93&quot;,&quot;spm&quot;:&quot;3001.5716&quot;}" data-report-query="spm=3001.5716" href="https://ac.csdn.net/?short_code=13271b93">
                                  认证
                                  
                                  
                                </a>
                                
                                
                              </li></ul>
                        </div>
                        <div class="toolbar-container-middle">
                        <div class="toolbar-search onlySearch"><div class="toolbar-search-container">
                    <input id="toolbar-search-input" autocomplete="off" type="text" value="" placeholder="Jenkins">
                    <button id="toolbar-search-button"><i></i><span>搜索</span></button>
                    <input type="password" autocomplete="new-password" readonly="" disabled="true" style="display: none; position:absolute;left:-9999999px;width:0;height:0;">
                  </div></div></div>
                        <div class="toolbar-container-right">
                          <div class="toolbar-btns onlyUser"><div class="toolbar-btn toolbar-btn-login csdn-toolbar-fl ">
                       <a data-report-click="{&quot;spm&quot;:&quot;3001.5105&quot;}" data-report-query="spm=3001.5105" href="https://passport.csdn.net/account/login">登录/注册</a>
                      </div>
                    <div class="toolbar-btn toolbar-btn-vip csdn-toolbar-fl">
                      <a data-report-click="{&quot;mod&quot;:&quot;popu_336&quot;,&quot;dest&quot;:&quot;https://mall.csdn.net/vip&quot;,&quot;spm&quot;:&quot;3001.4496&quot;}" data-report-query="spm=3001.4496" href="https://mall.csdn.net/vip">会员中心 <img style="position: relative; vertical-align: middle; width: 14px; top: -1px; left: 0px;;display:inline-block" "="" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210918025138.gif"></a>
                      </div>
                    <div class="toolbar-btn toolbar-btn-collect csdn-toolbar-fl">
                      <a data-report-click="{&quot;spm&quot;:&quot;3001.4506&quot;}" data-report-query="spm=3001.4506" href="https://i.csdn.net/#/user-center/collection-list?type=1">收藏</a>
                      </div>
                    <div class="toolbar-btn csdn-toolbar-fl"><a data-report-click="{&quot;spm&quot;:&quot;3001.4507&quot;}" data-report-query="spm=3001.4507" href="https://blink.csdn.net/">动态</a></div>
                    
                    <div class="toolbar-btn toolbar-btn-write csdn-toolbar-fl ">
                      <a data-report-click="{&quot;spm&quot;:&quot;3001.4503&quot;}" data-report-query="spm=3001.4503" href="https://mp.csdn.net/"><i></i>创作<i></i></a>
                    </div></div>
                        </div>
                      </div>
                    </div>
                  </div>
        <script>
            var toolbarSearchExt = '{"landingWord":[],"queryWord":"","tag":["Jenkins"],"title":"【Jenkins】持续集成环境实战"}';
        </script>
    <script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/csdn-toolbar.js" type="text/javascript"></script>
    <script>
    (function(){
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        }
        else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
    </script>
<link rel="stylesheet" href="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/blog_code-01256533b5.min.css">
<link rel="stylesheet" href="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/chart-3456820cac.css">
<div class="main_father clearfix d-flex justify-content-center" style="height: auto !important;"> 
    <div class="container clearfix" id="mainBox">
        <main>
<script type="text/javascript">
    function getQueryString(name) {   
      var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象  
      var r = window.location.search.substr(1).match(reg);  //匹配目标参数
      if( r != null ) return decodeURIComponent( r[2] ); return '';   
    }
    function stripscript(s){ 
      var pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~！@#￥……&*（）——|{}【】‘；：”“'。，、？%]") 
      var rs = ""; 
      for (var i = 0; i < s.length; i++) { 
        rs = rs+s.substr(i, 1).replace(pattern, ''); 
      } 
      return rs; 
    }
    var blogHotWords = stripscript(getQueryString('utm_term')).length > 1 ? stripscript(getQueryString('utm_term')) : ''
</script>
<div class="blog-content-box">
        <div class="article-header-box">
        <div class="article-header">
            <div class="article-title-box">
                <h1 class="title-article" id="articleContentId">【Jenkins】持续集成环境实战</h1>
            </div>
            <div class="article-info-box">
                <div class="article-bar-top">
                    <img class="article-type-img" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/original.png" alt="">
                    <div class="bar-content">
                    <a class="follow-nickName " href="https://blog.csdn.net/hancoder" target="_blank" rel="noopener">hancoder</a>
                    <span class="time">2021-06-26 03:10:49</span>
                    <img class="article-read-img article-heard-img" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/articleReadEyes.png" alt="">
                    <span class="read-count">3058</span>
                    <a id="blog_detail_zk_collection" class="un-collection" data-report-click="{&quot;mod&quot;:&quot;popu_823&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4232&quot;,&quot;ab&quot;:&quot;new&quot;}">
                        <img class="article-collect-img article-heard-img un-collect-status isdefault" style="display:inline-block" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/tobarCollect.png" alt="">
                        <img class="article-collect-img article-heard-img collect-status isactive" style="display:none" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/tobarCollectionActive.png" alt="">
                        <span class="name">收藏</span>
                        <span class="get-collection">
                            63
                        </span>
                    </a>
                    </div>
                </div>
                <div class="blog-tags-box">
                    <div class="tags-box artic-tag-box">
                            <span class="label">分类专栏：</span>
                                <a class="tag-link" href="https://blog.csdn.net/hancoder/category_11140481.html" target="_blank" rel="noopener">k8s</a>
                            <span class="label">文章标签：</span>
                                <a data-report-click="{&quot;mod&quot;:&quot;popu_626&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4223&quot;,&quot;strategy&quot;:&quot;Jenkins&quot;,&quot;ab&quot;:&quot;new&quot;}" class="tag-link" href="https://www.csdn.net/tags/MtTaEg0sMjY4NTQtYmxvZwO0O0OO0O0O.html" target="_blank" rel="noopener">Jenkins</a>
                    </div>
                </div>
                <div class="slide-content-box">
                    <div class="article-copyright">
                        <div class="creativecommons">
                            blog.csdn.net/hancoder#欢迎  可以打赏后索要离线md文件，打赏码在谷粒笔记的文尾
                        </div>
                        <div class="article-source-link">
                            本文链接：<a href="https://blog.csdn.net/hancoder/article/details/118233786" target="_blank">https://blog.csdn.net/hancoder/article/details/118233786</a>
                        </div>
                    </div>
                </div>
                <div class="operating">
                    <a class="href-article-edit slide-toggle">版权</a>
                </div>
            </div>
        </div>
    </div>
        <div id="blogColumnPayAdvert">
            <div class="column-group">
                <div class="column-group-item column-group0 column-group-item-one">
                    <div class="item-l">
                        <a class="item-target" href="https://blog.csdn.net/hancoder/category_11140481.html" target="_blank" title="k8s" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.6332&quot;}">
                            <img class="item-target" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210704200028250.png" alt="">
                            <span class="title item-target">k8s</span>
                        </a>
                        <span class="dec">专栏收录该内容</span>
                    </div>
                    <div class="item-m">
                        <span>13 篇文章</span>
                        <span>25 订阅</span>
                    </div>
                    <div class="item-r">
                            <a class="item-target article-column-bt articleColumnFreeBt" data-id="11140481">订阅专栏</a>
                    </div>
                </div>
            </div>
        </div>
    <article class="baidu_pl">
        <div id="article_content" class="article_content clearfix">
        <link rel="stylesheet" href="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/ck_htmledit_views-1a85854398.css">
                <div id="content_views" class="markdown_views prism-tomorrow-night-eighties" deep="6">
                    <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
                        <path stroke-linecap="round" d="M5,0 0,2.5 5,5z" id="raphael-marker-block" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path>
                    </svg>
                    <p>pdf供下载：<a href="https://download.csdn.net/download/hancoder/19835802">https://download.csdn.net/download/hancoder/19835802</a></p> 
<p>1、持续集成及Jenkins介绍</p> 
<p>2、Jenkins安装和持续集成环境配置</p> 
<p>3、Jenkins构建Maven项目</p> 
<p>4、Jenkins+Docker+SpringCloud微服务持续集成</p> 
<p>5、基于Kubernetes/K8S构建Jenkins微服务持续集成平台</p> 
<h1><a name="t0"></a><a id="Jenkins_15"></a>一、持续集成及Jenkins介绍</h1> 
<h2><a name="t1"></a><a id="_17"></a>软件开发生命周期</h2> 
<p>软件开发生命周期又叫做<strong>SDLC</strong>（Software Development Life Cycle），它是集合了计划、开发、测试和部署过程的集合。如下图所示 ：</p> 
<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210625231624.jpg" alt="img"> 
<ul><li>需求分析</li></ul> 
<p>这是生命周期的第一阶段，根据项目需求，团队执行一个可行性计划的分析。项目需求可能是公司内部或者客户提出的。这阶段主要是对信息的收集，也有可能是对现有项目的改善和重新做一个新的项目。还要分析项目的预算多长，可以从哪方面受益及布局，这也是项目创建的目标。</p> 
<ul><li>设计</li></ul> 
<p>第二阶段就是设计阶段，系统架构和满意状态（就是要做成什么样子，有什么功能），和创建一个项目计划。计划可以使用图表，布局设计或者文者的方式呈现。</p> 
<ul><li>实现</li></ul> 
<p>第三阶段就是实现阶段，项目经理创建和分配工作给开者，开发者根据任务和在设计阶段定义的目标进行开发代码。依据项目的大小和复杂程度，可以需要数月或更长时间才能完成。</p> 
<ul><li>测试</li></ul> 
<p>测试人员进行代码测试 ，包括功能测试、代码测试、压力测试等。</p> 
<ul><li>进化</li></ul> 
<p>最后进阶段就是对产品不断的进化改进和维护阶段，根据用户的使用情况，可能需要对某功能进行修改，bug修复，功能增加等。</p> 
<h2><a name="t2"></a><a id="_45"></a>软件开发瀑布模型</h2> 
<p>瀑布模型是最著名和最常使用的软件开发模型。瀑布模型就是一系列的软件开发过程。它是由制造业繁衍出来的。一个高度化的结构流程在一个方向上流动，有点像生产线一样。在瀑布模型创建之初，没有其它开发的模型，有很多东西全靠开发人员去猜测，去开发。这样的模型仅适用于那些简单的软件开发， 但是已经不适合现在的开发了。</p> 
<p>下图对软件开发模型的一个阐述。</p> 
<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/clip_image009.jpg" alt="img"> 
<div class="table-box"><table><thead><tr><th><strong>优势</strong></th><th><strong>劣势</strong></th></tr></thead><tbody><tr><td>简单易用和理解</td><td>各个阶段的划分完全固定，阶段之间产生大量的文档，极大地增加了工作量。</td></tr><tr><td>当前一阶段完成后，您只需要去关注后续阶段。</td><td>由于开发模型是线性的，用户只有等到整个过程的末期才能见到开发成果，从而增加了开发风险。</td></tr><tr><td>为项目提供了按阶段划分的检查节点</td><td>瀑布模型的突出缺点是不适应用户需求的变化。</td></tr></tbody></table></div>
<h2><a name="t3"></a><a id="_63"></a>软件的敏捷开发</h2> 
<h3><a name="t4"></a><a id="_65"></a>什么是敏捷开发？</h3> 
<p>敏捷开发（Agile Development） 的核心是迭代开发（Iterative Development） 与 增量开发（Incremental Development） 。</p> 
<h3><a name="t5"></a><a id="_69"></a><mark>何为迭代开发？</mark></h3> 
<p>对于大型软件项目，传统的开发方式是采用一个大周期（比如一年）进行开发，整个过程就是一次"大开发"；迭代开发的方式则不一样，它将开发过程拆分成多个小周期，即一次"大开发"变成多次"小开发"，每次小开发都是同样的流程，所以看上去就好像重复在做同样的步骤。</p> 
<p>举例来说，SpaceX 公司想造一个大推力火箭，将人类送到火星。但是，它不是一开始就造大火箭，而是先造一个最简陋的小火箭 Falcon 1。结果，第一次发射就爆炸了，直到第四次发射，才成功进入轨道。然后，开发了中型火箭 Falcon 9，九年中发射了70次。最后，才开发 Falcon 重型火箭。如果SpaceX 不采用迭代开发，它可能直到现在还无法上天。</p> 
<h3><a name="t6"></a><a id="_75"></a>=<mark>何为增量开发？</mark></h3> 
<p>软件的每个版本，都会新增一个用户可以感知的完整功能。也就是说，按照新增功能来划分迭代。</p> 
<p>举例来说，房产公司开发一个10栋楼的小区。如果采用增量开发的模式，该公司第一个迭代就是交付一号楼，第二个迭代交付二号楼…每个迭代都是完成一栋完整的楼。而不是第一个迭代挖好10栋楼的地基，第二个迭代建好每栋楼的骨架，第三个迭代架设屋顶…</p> 
<h3><a name="t7"></a><a id="_81"></a>敏捷开发如何迭代？</h3> 
<p>虽然敏捷开发将软件开发分成多个迭代，但是也要求，每次迭代都是一个完整的软件开发周期，必须按照软件工程的方法论，进行正规的流程管理。</p> 
<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/clip_image011.jpg" alt="img"> 
<h3><a name="t8"></a><a id="_93"></a>敏捷开发有什么好处？</h3> 
<p>早期交付</p> 
<p>敏捷开发的第一个好处，就是早期交付，从而大大降低成本。 还是以上一节的房产公司为例，如果按照传统的"瀑布开发模式"，先挖10栋楼的地基、再盖骨架、然后架设屋顶，每个阶段都等到前一个阶段完成后开始，可能需要两年才能一次性交付10栋楼。也就是说，如果不考虑预售，该项目必须等到两年后才能回款。 敏捷开发是六个月后交付一号楼，后面每两个月交付一栋楼。因此，半年就能回款10%，后面每个月都会有现金流，资金压力就大大减轻了。</p> 
<p>降低风险</p> 
<p>敏捷开发的第二个好处是，及时了解市场需求，降低产品不适用的风险。 请想一想，哪一种情况损失比较小：10栋楼都造好以后，才发现卖不出去，还是造好第一栋楼，就发现卖不出去，从而改进或停建后面9栋楼？</p> 
<h2><a name="t9"></a><a id="_103"></a>什么是持续集成</h2> 
<p>持续集成（ Continuous integration ， 简称 CI ）指的是，频繁地（一天多次）将代码集成到主干。</p> 
<p>**持续集成的目的，就是让产品可以快速迭代，同时还能保持高质量。**它的核心措施是，代码集成到主干之前，必须通过自动化测试。只要有一个测试用例失败，就不能集成。</p> 
<p>通过持续集成， 团队可以快速的从一个功能到另一个功能，简而言之，敏捷软件开发很大一部分都要归功于持续集成。</p> 
<p><mark>持续集成的流程</mark></p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/f66319d925f53b76633b01584f22fc3c.png" alt="img"></p> 
<p>根据持续集成的设计，代码从提交到生产，整个过程有以下几步。</p> 
<ul><li>提交</li></ul> 
<p>流程的第一步，是开发者向代码仓库提交代码。所有后面的步骤都始于本地代码的一次提交（commit）</p> 
<ul><li>测试（第一轮）</li></ul> 
<p>代码仓库对commit操作配置了钩子（hook），只要提交代码或者合并进主干，就会跑自动化测试。</p> 
<ul><li>构建</li></ul> 
<p>通过第一轮测试，代码就可以合并进主干，就算可以交付了。</p> 
<p>交付后，就先进行构建（build），再进入第二轮测试。所谓构建，指的是将源码转换为可以运行的实际代码，比如安装依赖，配置各种资源（样式表、JS脚本、图片）等等。</p> 
<ul><li>测试（第二轮）</li></ul> 
<p>构建完成，就要进行第二轮测试。如果第一轮已经涵盖了所有测试内容，第二轮可以省略，当然，这时构建步骤也要移到第一轮测试前面。</p> 
<ul><li>部署</li></ul> 
<p>过了第二轮测试，当前代码就是一个可以直接部署的版本（artifact）。将这个版本的所有文件打包（tar ﬁlename.tar * ）存档，发到生产服务器。</p> 
<ul><li>回滚</li></ul> 
<p>一旦当前版本发生问题，就要回滚到上一个版本的构建结果。最简单的做法就是修改一下符号链接，指向上一个版本的目录。</p> 
<h2><a name="t10"></a><a id="_147"></a>持续集成的组成要素</h2> 
<ul><li>一个自动构建过程， 从检出代码、 编译构建、 运行测试、 结果记录、 测试统计等都是自动完成的， 无需人工干预。</li><li>一个代码存储库，即需要版本控制软件来保障代码的可维护性，同时作为构建过程的素材库，一般使用SVN或Git。</li><li>一个持续集成服务器， Jenkins 就是一个配置简单和使用方便的持续集成服务器。</li></ul> 
<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210625232033.jpg" alt="img"> 
<h2><a name="t11"></a><a id="_155"></a>持续集成的好处</h2> 
<p>1、降低风险，由于持续集成不断去构建，编译和测试，可以很早期发现问题，所以修复的代价就少；</p> 
<p>2、对系统健康持续检查，减少发布风险带来的问题；</p> 
<p>3、减少重复性工作；</p> 
<p>4、持续部署，提供可部署单元包；</p> 
<p>5、持续交付可供使用的版本；</p> 
<p>6、增强团队信心；</p> 
<h2><a name="t12"></a><a id="Jenkins_169"></a>Jenkins介绍</h2> 
<p>Jenkins 是一款流行的开源持续集成（Continuous Integration）工具，广泛用于项目开发，具有自动化构建、测试和部署等功能。官网： http://jenkins-ci.org/。</p> 
<p>Jenkins的特征：</p> 
<p>开源的Java语言开发持续集成工具，支持持续集成，持续部署。</p> 
<p>易于安装部署配置：可通过yum安装,或下载war包以及通过docker容器等快速实现安装部署，可方便web界面配置管理。</p> 
<p>消息通知及测试报告：集成RSS/E-mail通过RSS发布构建结果或当构建完成时通过e-mail通知，生成JUnit/TestNG测试报告。</p> 
<p>分布式构建：支持Jenkins能够让多台计算机一起构建/测试。</p> 
<p>文件识别：Jenkins能够跟踪哪次构建生成哪些jar，哪次构建使用哪个版本的jar等。</p> 
<p>丰富的插件支持：支持扩展插件，你可以开发适合自己团队使用的工具，如git，svn，maven，docker等。</p> 
<h1><a name="t13"></a><a id="Jenkins_188"></a>二、Jenkins安装和持续集成环境配置</h1> 
<h2><a name="t14"></a><a id="_190"></a>持续集成流程说明</h2> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/8c171bf0bdcc4be6c5b9a3dbc4568a32.png" alt="img"></p> 
<p>1）首先，开发人员每天进行代码提交，提交到Git仓库</p> 
<p>2）然后，Jenkins作为持续集成工具，使用Git工具到Git仓库拉取代码到集成服务器，再配合JDK，</p> 
<p>Maven等软件完成代码编译，代码测试与审查，测试，打包等工作，在这个过程中每一步出错，都重新再执行一次整个流程。</p> 
<p>3）最后，Jenkins把生成的jar或war包分发到测试服务器或者生产服务器，测试人员或用户就可以访问应用。</p> 
<h3><a name="t15"></a><a id="_204"></a>服务器列表</h3> 
<p>虚拟机统一采用CentOS7。</p> 
<div class="table-box"><table><thead><tr><th><strong>名称</strong></th><th>IP地址</th><th><strong>安装的软件</strong></th></tr></thead><tbody><tr><td>代码托管服务器</td><td>192.168.66.100</td><td>Gitlab-12.4.2</td></tr><tr><td>持续集成服务器</td><td>192.168.66.101</td><td>Jenkins-2.190.3，JDK1.8，Maven3.6.2，Git， SonarQube</td></tr><tr><td>应用测试服务器</td><td>192.168.66.102</td><td>JDK1.8，Tomcat8.5</td></tr></tbody></table></div>
<h3><a name="t16"></a><a id="Gitlab_216"></a>Gitlab代码托管服务器安装</h3> 
<h4><a id="Gitlab_218"></a>Gitlab简介</h4> 
<p>官网： https://about.gitlab.com/</p> 
<p>GitLab 是一个用于仓库管理系统的开源项目，使用Git作为代码管理工具，并在此基础上搭建起来的web服务。</p> 
<p>GitLab和GitHub一样属于第三方基于Git开发的作品，免费且开源（基于MIT协议），与Github类似，可以注册用户，任意提交你的代码，添加SSHKey等等。不同的是，GitLab是可以部署到自己的服务器上，数据库等一切信息都掌握在自己手上，适合团队内部协作开发，你总不可能把团队内部的智慧总放在别人的服务器上吧？简单来说可把GitLab看作个人版的GitHub。</p> 
<h4><a id="Gitlab_228"></a>Gitlab安装</h4> 
<p>\1. 安装相关依赖</p> 
<p>yum -y install policycoreutils openssh-server openssh-clients postﬁx</p> 
<p>\2. 启动ssh服务&amp;设置为开机启动</p> 
<p>systemctl enable sshd &amp;&amp; sudo systemctl start sshd</p> 
<p>\3. 设置postﬁx开机自启，并启动，postﬁx支持gitlab发信功能</p> 
<p>systemctl enable postﬁx &amp;&amp; systemctl start postﬁx</p> 
<p>\4. 开放ssh以及http服务，然后重新加载防火墙列表 ﬁrewall-cmd --add-service=ssh --permanent ﬁrewall-cmd --add-service=http --permanent ﬁrewall-cmd --reload</p> 
<p>如果关闭防火墙就不需要做以上配置</p> 
<p>\5. 下载gitlab包，并且安装在线下载安装包：</p> 
<p><a href="https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/gitlab-ce-12.4.2-ce.0.el6.x86_64.rpm">wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/gitlab-ce-12.4.2-ce.0.el6.x 86_64.rpm</a></p> 
<p>安装：</p> 
<p>rpm -i gitlab-ce-12.4.2-ce.0.el6.x86_64.rpm</p> 
<p>\6. 修改gitlab配置</p> 
<p>vi /etc/gitlab/gitlab.rb</p> 
<p>修改gitlab访问地址和端口，默认为80，我们改为82 external_url ‘http://192.168.66.100:82’</p> 
<p>nginx[‘listen_port’] = 82</p> 
<p>\7. 重载配置及启动gitlab gitlab-ctl reconﬁgure gitlab-ctl restart</p> 
<p>\8. 把端口添加到防火墙</p> 
<p>ﬁrewall-cmd --zone=public --add-port=82/tcp --permanent ﬁrewall-cmd --reload</p> 
<p>启动成功后，看到以下修改管理员root密码的页面，修改密码后，然后登录即可</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-hJwrsczu-1624726844473)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image038.jpg)]</p> 
<h4><a id="Gitlab_274"></a>Gitlab添加组、创建用户、创建项目</h4> 
<p>1）创建组</p> 
<p>使用管理员 root 创建组，一个组里面可以有多个项目分支，可以将开发添加到组里面进行设置权限，不同的组就是公司不同的开发项目或者服务模块，不同的组添加不同的开发即可实现对开发设置权限的管理</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/6e90d6ff7499debf41f09660e122b1c1.png" alt="img"></p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/1bde491821e01a8c5adb66b2be060c64.png" alt="img"></p> 
<p>2）创建用户</p> 
<p>创建用户的时候，可以选择Regular或Admin类型。</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/2314faf08885752894324637bc61d738.png" alt="img"></p> 
<p>创建完用户后，立即修改密码</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/8c4feea210c1280cb75fe440912ebf07.png" alt="img"></p> 
<p>3）将用户添加到组中</p> 
<p>选择某个用户组，进行Members管理组的成员</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/f10c9f405ae67051a430ff04d1e877bc.png" alt="img"></p> 
<p>Gitlab用户在组里面有5种不同权限：</p> 
<ul><li>Guest：可以创建issue、发表评论，不能读写版本库</li><li>Reporter：可以克隆代码，不能提交，QA、PM可以赋予这个权限</li><li>Developer：可以克隆代码、开发、提交、push，普通开发可以赋予这个权限</li><li>Maintainer：可以创建项目、添加tag、保护分支、添加项目成员、编辑项目，核心开发可以赋予这个权限</li><li>Owner：可以设置项目访问权限 - Visibility Level、删除项目、迁移项目、管理组成员，开发组组长可以赋予这个权限</li></ul> 
<p>4）在用户组中创建项目</p> 
<p>以刚才创建的新用户身份登录到Gitlab，然后在用户组中创建新的项目</p> 
<h3><a name="t17"></a><a id="Gitlab_320"></a>源码上传到Gitlab仓库</h3> 
<p>下面来到IDEA开发工具，我们已经准备好一个简单的Web应用准备到集成部署。我们要把源码上传到Gitlab的项目仓库中。</p> 
<p>1）项目结构说明</p> 
<p>我们建立了一个非常简单的web应用，只有一个index.jsp页面，如果部署好，可以访问该页面就成功啦！</p> 
<p>2）开启版本控制</p> 
<p>2）提交代码到本地仓库先Add到缓存区</p> 
<p>git add<br data-filtered="filtered"> 再Commit到本地仓库</p> 
<p>3）推送到Gitlab项目仓库中</p> 
<p>这时都Gitlab的项目中拷贝url地址</p> 
<p>输入gitlab的用户名和密码，然后就可以把代码推送到远程仓库啦</p> 
<p>刷新gitlab项目</p> 
<h2><a name="t18"></a><a id="1Jenkins_343"></a>持续集成环境(1)-Jenkins安装</h2> 
<p>1）安装JDK</p> 
<p>Jenkins需要依赖JDK，所以先安装JDK1.8 yum install java-1.8.0-openjdk* -y</p> 
<p>安装目录为：/usr/lib/jvm</p> 
<p>2）获取jenkins安装包</p> 
<p>下载页面：https://jenkins.io/zh/download/安装文件：jenkins-2.190.3-1.1.noarch.rpm</p> 
<p>3）把安装包上传到192.168.66.101服务器，进行安装 rpm -ivh jenkins-2.190.3-1.1.noarch.rpm</p> 
<p>4）修改Jenkins配置</p> 
<p>vi /etc/syscoﬁg/jenkins</p> 
<p>修改内容如下： JENKINS_USER=“root” JENKINS_PORT=“8888”</p> 
<p>5）启动Jenkins</p> 
<p>systemctl start jenkins</p> 
<p>6）打开浏览器访问 http://192.168.66.101:8888</p> 
<p>注意：本服务器把防火墙关闭了，如果开启防火墙，需要在防火墙添加端口</p> 
<p>7）获取并输入admin账户密码</p> 
<p>cat /var/lib/jenkins/secrets/initialAdminPassword</p> 
<p>8）跳过插件安装</p> 
<p>因为Jenkins插件需要连接默认官网下载，速度非常慢，而且经过会失败，所以我们暂时先跳过插件安装</p> 
<p>9）添加一个管理员账户，并进入Jenkins后台</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/be722580e59d0173f2e5557fef489b58.png" alt="img"></p> 
<p>保存并完成</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/d6b86077feb352291c7ca6fb3fcf1f78.png" alt="img"></p> 
<p>开始使用Jenkins</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/3e680a13d3f3cc07d5aa38b4e4f0e9c7.png" alt="img"></p> 
<h2><a name="t19"></a><a id="2Jenkins_399"></a>持续集成环境(2)-Jenkins插件管理</h2> 
<p>Jenkins本身不提供很多功能，我们可以通过使用插件来满足我们的使用。例如从Gitlab拉取代码，使用Maven构建项目等功能需要依靠插件完成。接下来演示如何下载插件。</p> 
<p>修改Jenkins插件下载地址</p> 
<p>Jenkins国外官方插件地址下载速度非常慢，所以可以修改为国内插件地址： Jenkins-&gt;Manage Jenkins-&gt;Manage Plugins，点击Available</p> 
<p>这样做是为了把Jenkins官方的插件列表下载到本地，接着修改地址文件，替换为国内插件地址</p> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">cd /var/lib/jenkins/updates

sed -i 's/http:\/\/updates.jenkinsci.org\/download/https:\/\/mirrors.tuna.tsinghua.edu.cn\/jenkins/g' default.json &amp;&amp; sed -i
's/http:\/\/www.google.com/https:\/\/www.baidu.com/g' default.json
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li></ul></pre> 
<p>最后，Manage Plugins点击Advanced，把Update Site改为国内插件下载地址 https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json</p> 
<p>Sumbit后，在浏览器输入： http://192.168.66.101:8888/restart ，重启Jenkins。<strong>下载中文汉化插件</strong></p> 
<p>Jenkins-&gt;Manage Jenkins-&gt;Manage Plugins，点击Available，搜索"Chinese"</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/7b4540e2e5f30c28a9bc424762fdd525.png" alt="img"></p> 
<p>完成后如下图：</p> 
<p>重启Jenkins后，就看到Jenkins汉化了！（PS：但可能部分菜单汉化会失败）</p> 
<h2><a name="t20"></a><a id="3Jenkins_429"></a>持续集成环境(3)-Jenkins用户权限管理</h2> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/e56858801c9b8c7a929aa4052bff77bc.png" alt="img"><br data-filtered="filtered"> 我们可以利用Role-based Authorization Strategy 插件来管理Jenkins用户权限安装Role-based Authorization Strategy插件</p> 
<h3><a name="t21"></a><a id="_435"></a>开启权限全局安全配置</h3> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/9b1e5493cfaab2dda57d3effd4b3dbfd.png" alt="img"></p> 
<p>授权策略切换为"Role-Based Strategy"，保存</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/e56858801c9b8c7a929aa4052bff77bc.png" alt="img"></p> 
<h3><a name="t22"></a><a id="_445"></a>创建角色</h3> 
<p>在系统管理页面进入 Manage and Assign Roles</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/8d434260ba9fbe1c013498ee3045585c.png" alt="img"></p> 
<p>点击"Manage Roles"</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/32b128e2dec263307a96ace2c17a1b05.png" alt="img"></p> 
<ul><li>Global roles（全局角色）：管理员等高级用户可以创建基于全局的角色</li><li>Project roles（项目角色）：针对某个或者某些项目的角色</li><li>Slave roles（奴隶角色）：节点相关的权限</li></ul> 
<p>我们添加以下三个角色：</p> 
<ul><li>baseRole：该角色为全局角色。这个角色需要绑定Overall下面的Read权限，是为了给所有用户绑定最基本的Jenkins访问权限。注意：如果不给后续用户绑定这个角色，会报错误：用户名 is missing the Overall/Read permission</li><li>role1：该角色为项目角色。使用正则表达式绑定"itcast.*"，意思是只能操作itcast开头的项目。</li><li>role2：该角色也为项目角色。绑定"itheima.*"，意思是只能操作itheima开头的项目。</li></ul> 
<p>保存。创建用户</p> 
<p>在系统管理页面进入 Manage Users</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/ce16513d9e9112647bce7872dcb212b8.png" alt="img"></p> 
<p>分别创建两个用户：jack和eric</p> 
<h3><a name="t23"></a><a id="_477"></a>给用户分配角色</h3> 
<p>系统管理页面进入Manage and Assign Roles，点击Assign Roles</p> 
<p>绑定规则如下：</p> 
<p>eric用户分别绑定baseRole和role1角色</p> 
<p>jack用户分别绑定baseRole和role2角色</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/968394770f6677a4e87409d242ae3612.png" alt="img"></p> 
<p>保存。</p> 
<h3><a name="t24"></a><a id="_492"></a>创建项目测试权限</h3> 
<p>以itcast管理员账户创建两个项目，分别为itcast01和itheima01</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/89c67d0294ae3764b820a882f433a6c7.png" alt="img"></p> 
<p>结果为：</p> 
<p>eric用户登录，只能看到itcast01项目</p> 
<p>jack用户登录，只能看到itheima01项目</p> 
<h2><a name="t25"></a><a id="4Jenkins_505"></a>持续集成环境(4)-Jenkins凭证管理</h2> 
<p>凭据可以用来存储需要密文保护的数据库密码、Gitlab密码信息、Docker私有仓库密码等，以便Jenkins可以和这些第三方的应用进行交互。</p> 
<h3><a name="t26"></a><a id="Credentials_Binding_510"></a>安装Credentials Binding插件</h3> 
<p>要在Jenkins使用凭证管理功能，需要安装Credentials Binding插件</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/9d05bb633377a337e03c8be4e423775a.png" alt="img"></p> 
<p>安装插件后，左边多了"凭证"菜单，在这里管理所有凭证</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/2ad369bd979020e839fdd05d2214a9b6.png" alt="img"></p> 
<p>可以添加的凭证有5种：</p> 
<ul><li>Username with password：用户名和密码</li><li>SSH Username with private key： 使用SSH用户和密钥</li><li>Secret ﬁle：需要保密的文本文件，使用时Jenkins会将文件复制到一个临时目录中，再将文件路径设置到一个变量中，等构建结束后，所复制的Secret ﬁle就会被删除。</li><li>Secret text：需要保存的一个加密的文本串，如钉钉机器人或Github的api token</li><li>Certiﬁcate：通过上传证书文件的方式</li></ul> 
<p>常用的凭证类型有：Username with password（用户密码）和SSH Username with private key（SSH密钥）</p> 
<p>接下来以使用Git工具到Gitlab拉取项目源码为例，演示Jenkins的如何管理Gitlab的凭证。</p> 
<p>安装Git插件和Git工具</p> 
<p>在CentOS7上安装Git插件</p> 
<p>为了让Jenkins支持从Gitlab拉取源码，需要安装Git插件。</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/baf978ebf1bab0a9e5a8ba54bb1ed825.png" alt="img"></p> 
<p>CentOS7上安装Git工具：</p> 
<p>yum install git -y 安装</p> 
<p>git --version 安装后查看版本</p> 
<h3><a name="t27"></a><a id="_549"></a>用户密码类型</h3> 
<p>1）创建凭证</p> 
<p>Jenkins-&gt;凭证-&gt;系统-&gt;全局凭证-&gt;添加凭证</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/5e0ff6f5a62e849340ee6080052525d5.png" alt="img"></p> 
<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/clip_image116.jpg" alt="img"> 
<p>选择"Username with password"，输入Gitlab的用户名和密码，点击"确定"。</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/44ed67d315e1cd059970a75723f1b773.png" alt="img"></p> 
<p>2）测试凭证是否可用</p> 
<p>创建一个FreeStyle项目：新建Item-&gt;FreeStyle Project-&gt;确定</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/8cc9fd4223c66616a58bdd00863dcb43.png" alt="img"></p> 
<h3><a name="t28"></a><a id="SSH_574"></a>SSH密钥类型</h3> 
<p>SSH免密登录示意图：公钥私钥</p> 
<p>使用root用户生成公钥和私钥 <code>ssh-keygen -t rsa</code></p> 
<p>在/root/.ssh/目录保存了公钥和私钥</p> 
<ul><li>id_rsa：私钥文件</li><li>id_rsa.pub：公钥文件</li></ul> 
<p>2）把生成的公钥放在Gitlab中</p> 
<p>以root账户登录-&gt;点击头像-&gt;Settings-&gt;SSH Keys</p> 
<p>复制刚才id_rsa.pub文件的内容到这里，点击"Add Key"<br data-filtered="filtered"> <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/24b7e40484e99b911906d6f417da6ca6.png" alt="img"> |</p> 
<p>3）在Jenkins中添加凭证，配置私钥</p> 
<p>在Jenkins添加一个新的凭证，类型为"SSH Username with private key"，把刚才生成<strong>私钥</strong>文件内容复制过来</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/a0e00b333ad39277cf00f73ef38c6dc3.png" alt=""></p> 
<p>4）测试凭证是否可用</p> 
<p>新建"test02"项目-&gt;源码管理-&gt;Git，这次要使用Gitlab的SSH连接，并且选择SSH凭证</p> 
<p>同样尝试构建项目，如果代码可以正常拉取，代表凭证配置成功！</p> 
<h2><a name="t29"></a><a id="5Maven_607"></a>持续集成环境(5)-Maven安装和配置</h2> 
<p>在Jenkins集成服务器上，我们需要安装Maven来编译和打包项目。安装Maven</p> 
<p>先上传Maven软件到192.168.66.101</p> 
<pre class="prettyprint"><code class="prism language-sh has-numbering" onclick="mdcp.signin(event)" style="position: unset;">tar -xzf apache-maven-3.6.2-bin.tar.gz #解压

mkdir -p /opt/maven # 创建目录

mv apache-maven-3.6.2/* /opt/maven # 移动文件

#**配置环境变量**
vi /etc/proﬁle
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
export MAVEN_HOME=/opt/maven
export PATH=$PATH:$JAVA_HOME/bin:$MAVEN_HOME/bin

source /etc/proﬁle #配置生效
mvn -v #查找Maven版本
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li></ul></pre> 
<h4><a id="JKJDKMaven_630"></a>JK关联JDK和Maven</h4> 
<p>全局工具配置</p> 
<p>Jenkins-&gt;Global Tool Conﬁguration-&gt;JDK-&gt;新增JDK，配置如下：</p> 
<blockquote> 
 <p>指定JDK的JAVA_HOME即可</p> 
</blockquote> 
<p>Jenkins-&gt;Global Tool Conﬁguration-&gt;Maven-&gt;新增Maven，配置如下：</p> 
<blockquote> 
 <p>同理指定MAVEN的MAVEM_HOME</p> 
</blockquote> 
<h4><a id="Jenkins_642"></a>添加Jenkins全局变量</h4> 
<p>Manage Jenkins-&gt;Conﬁgure System-&gt;Global Properties ，添加三个全局变量JAVA_HOME、M2_HOME、PATH+EXTRA</p> 
<ul><li>JAVA_HOME、</li><li>M2_HOME、</li><li>PATH+EXTRA：<code>$M2_HOME/bin$</code></li></ul> 
<h4><a id="Mavensettingsxml_652"></a>修改Maven的settings.xml</h4> 
<pre class="prettyprint"><code class="prism language-sh has-numbering" onclick="mdcp.signin(event)" style="position: unset;">mkdir /root/repo # 创建本地仓库目录

vi /opt/maven/conf/settings.xml

# 本地仓库改为：/root/repo/

#添加阿里云私服地址：
alimaven aliyun maven http://maven.aliyun.com/nexus/content/groups/public/ central
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li></ul></pre> 
<h4><a id="Maven_665"></a>测试Maven是否配置成功</h4> 
<p>使用之前的gitlab密码测试项目，修改配置</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/c82ea3ce553b089c58fefad15618e37f.png" alt="img"></p> 
<h4><a id="JKgitlab_671"></a>JK填写gitlab地址</h4> 
<p>找到"源码管理"-&gt;“Git”，在Repository URL复制Gitlab中的项目URL</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/f98539839514a8b8e3fb9f36bc0a87a2.png" alt="img"></p> 
<p>这时会报错说无法连接仓库！在Credentials选择刚刚添加的凭证就不报错啦</p> 
<p>保存配置后，点击构建”Build Now“ 开始构建项目</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/deaffe8a2d4483b07607a31ee0a9f671.png" alt="img"></p> 
<h4><a id="_685"></a>构建</h4> 
<p>构建-&gt;增加构建步骤-&gt;Execute Shell</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/8d014bc0b239785c1db672bdc98d072b.png" alt="img"></p> 
<h4><a id="_696"></a>打包</h4> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/33e100a05f85815390f5e5d02c0784ea.png" alt="img"></p> 
<p>查看linux的**/var/lib/jenkins/workspace/**目录，发现已经从Gitlab成功拉取了代码到Jenkins中。</p> 
<p>在Jenkins里输入 <code>mvn clean package</code></p> 
<p>再次构建，如果可以把项目打成war包，代表maven环境配置成功啦！</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/2896236941d445205280777da89d57a7.png" alt="img"></p> 
<h2><a name="t30"></a><a id="6Tomcat_709"></a>持续集成环境(6)-Tomcat安装和配置</h2> 
<h3><a name="t31"></a><a id="Tomcat85_711"></a>安装Tomcat8.5</h3> 
<p>把Tomcat压缩包上传到192.168.66.102服务器</p> 
<pre class="prettyprint"><code class="prism language-SH has-numbering" onclick="mdcp.signin(event)" style="position: unset;">yum install java-1.8.0-openjdk* -y # 安装JDK

tar -xzf apache-tomcat-8.5.47.tar.gz #解压

mkdir -p /opt/tomcat #创建目录

mv /root/apache-tomcat-8.5.47/* /opt/tomcat #移动文件

/opt/tomcat/bin/startup.sh #启动tomcat
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li></ul></pre> 
<p>注意：服务器已经关闭了防火墙，所以可以直接访问Tomcat啦地址为：http://192.168.66.102/8080</p> 
<h3><a name="t32"></a><a id="Tomcat_730"></a>配置Tomcat用户角色权限</h3> 
<p>默认情况下Tomcat是没有配置用户角色权限的</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/d65926e878a815b69798d41138d8d2a3.png" alt="img"></p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/10cddb7484fe690fcba0974d575fe29d.png" alt="img"></p> 
<p>但是，后续Jenkins部署项目到Tomcat服务器，需要用到Tomcat的用户，所以修改tomcat以下配置，添加用户及权限</p> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">vi /opt/tomcat/conf/tomcat-users.xml
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li></ul></pre> 
<p>内容如下：</p> 
<pre class="prettyprint"><code class="prism language-XML has-numbering" onclick="mdcp.signin(event)" style="position: unset;">&lt;tomcat-users&gt;
   &lt;role rolename="tomcat"/&gt;
   &lt;role rolename="role1"/&gt;
   &lt;role rolename="manager-script"/&gt;
   &lt;role rolename="manager-gui"/&gt;
   &lt;role rolename="manager-status"/&gt;
   &lt;role rolename="admin-gui"/&gt;
   &lt;role rolename="admin-script"/&gt;
   &lt;user username="tomcat" password="tomcat" roles="manager-gui,managerscript,tomcat,admin-gui,admin-script"/&gt;
&lt;/tomcat-users&gt;
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li></ul></pre> 
<p>用户和密码都是：tomcat</p> 
<p>注意：为了能够刚才配置的用户登录到Tomcat，还需要修改以下配置</p> 
<p>vi /opt/tomcat/webapps/manager/META-INF/context.xml</p> 
<pre class="prettyprint"><code class="prism language-xml has-numbering" onclick="mdcp.signin(event)" style="position: unset;"><span class="token comment">&lt;!--
&lt;Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" /&gt;
--&gt;</span>
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li></ul></pre> 
<p>把上面这行注释掉即可！重启Tomcat</p> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">/opt/tomcat/bin/shutdown.sh 停止

/opt/tomcat/bin/startup.sh 启动
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li></ul></pre> 
<p>访问： http://192.168.66.102:8080/manager/html ，输入tomcat和tomcat，看到以下页面代表成功啦</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/e2bc85219d31e03229ff9a325032af2e.png" alt="img"></p> 
<h1><a name="t33"></a><a id="JenkinsMaven_787"></a>三、Jenkins构建Maven项目</h1> 
<h2><a name="t34"></a><a id="Jenkins1Jenkins_789"></a>Jenkins项目构建类型(1)-Jenkins构建的项目类型介绍</h2> 
<p>Jenkins中自动构建项目的类型有很多，常用的有以下三种：</p> 
<ul><li>自由风格软件项目（FreeStyle Project）</li><li>Maven项目（Maven Project）</li><li>流水线项目（Pipeline Project）</li></ul> 
<p>每种类型的构建其实都可以完成一样的构建过程与结果，只是在操作方式、灵活度等方面有所区别，在实际开发中可以根据自己的需求和习惯来选择。（PS：个人推荐使用流水线类型，因为灵活度非常高）</p> 
<h2><a name="t35"></a><a id="Jenkins2_799"></a>Jenkins项目构建类型(2)-自由风格项目构建</h2> 
<p>下面演示创建一个自由风格项目来完成项目的集成过程：拉取代码-&gt;编译-&gt;打包-&gt;部署</p> 
<h3><a name="t36"></a><a id="_803"></a>拉取代码</h3> 
<p>1）创建项目</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/247ffd1c6109f54f9182262c0bbbe53e.png" alt="img"></p> 
<p>2）配置源码管理，从gitlab拉取代码</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/22b937d7e8ebb2eed99b2143af18c3a2.png" alt="img"></p> 
<h3><a name="t37"></a><a id="_815"></a>编译打包</h3> 
<p>构建-&gt;添加构建步骤-&gt;Executor Shell</p> 
<pre class="prettyprint"><code class="prism language-SH has-numbering" onclick="mdcp.signin(event)" style="position: unset;">echo "开始编译和打包"
mvn clean package
echo "编译和打包结束"
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li></ul></pre> 
<h3><a name="t38"></a><a id="_825"></a>部署</h3> 
<p>把项目部署到远程的Tomcat里面</p> 
<h5><a id="1_Deploy_to_container_829"></a>1）安装 Deploy to container插件</h5> 
<p>Jenkins本身无法实现<strong>远程部署到Tomcat</strong>的功能，需要安装Deploy to container插件实现</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/cbb84fa71b9564b60ec2c0924cb55f4f.png" alt="img"></p> 
<p>2）添加Tomcat用户凭证</p> 
<h5><a id="3_838"></a>3）添加构建后操作</h5> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/5290e7b9b29e82d0a2749b23621e81b6.png" alt=""></p> 
<p>部署到容器（远程tomcat）</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/2954790a6336c04486ac07e5d1ce6baf.png" alt="img"></p> 
<p>点击"Build Now"，开始构建过程</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/179289685a89a9d95483c204199c153c.png" alt="img"></p> 
<p>4）部署成功后，访问项目 http://192.168.66.102:8080/web_demo-1.0-SNAPSHOT/</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/ae0ef77bb1fa071af26202ac9666a78d.png" alt="img"></p> 
<h5><a id="_854"></a>演示改动代码后的持续集成</h5> 
<p>1）IDEA中源码修改并提交到gitlab</p> 
<p>2）在Jenkins中项目重新构</p> 
<p>3）访问Tomcat</p> 
<h2><a name="t39"></a><a id="Jenkins3Maven_862"></a>Jenkins项目构建类型(3)-Maven项目构建</h2> 
<p>1）安装Maven Integration插件</p> 
<p>2）创建Maven项目</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/2934b18f02cc58b52ed2577e3daee194.png" alt="img"></p> 
<p>3）配置项目</p> 
<p>拉取代码和远程部署的过程和自由风格项目一样，只是"构建"部分不同</p> 
<blockquote> 
 <p>之前是通过shell来指定编译后的行为</p> 
</blockquote> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/fce42060ebb8272d0b3010fc08268609.png" alt=""></p> 
<p>继续git push，然后<strong>点击构建</strong></p> 
<p>就完成了clean、package</p> 
<h2><a name="t40"></a><a id="Jenkins4Pipeline_883"></a>Jenkins项目构建类型(4)-Pipeline流水线项目构建</h2> 
<h3><a name="t41"></a><a id="Pipeline_885"></a>Pipeline简介</h3> 
<blockquote> 
 <p>编写构建过程</p> 
</blockquote> 
<p>1）概念</p> 
<p>Pipeline，简单来说，就是一套运行在 Jenkins 上的工作流框架，将原来独立运行于单个或者多个节点的任务连接起来，实现单个任务难以完成的复杂流程编排和可视化的工作。</p> 
<p>2）使用Pipeline有以下好处（来自翻译自官方文档）：</p> 
<ul><li>代码：Pipeline以代码的形式实现，通常被检入源代码控制，使团队能够编辑，审查和迭代其传送流程。</li><li>持久：无论是计划内的还是计划外的服务器重启，Pipeline都是可恢复的。</li><li>可停止：Pipeline可接收交互式输入，以确定是否继续执行Pipeline。</li><li>多功能：Pipeline支持现实世界中复杂的持续交付要求。它支持fork/join、循环执行，并行执行任务的功能。</li><li>可扩展：Pipeline插件支持其DSL的自定义扩展 ，以及与其他插件集成的多个选项。</li></ul> 
<p>3）如何创建 Jenkins Pipeline呢？</p> 
<p>Pipeline 脚本是由 <strong>Groovy</strong> 语言实现的，但是我们没必要单独去学习 Groovy</p> 
<p>Pipeline 支持两种语法：<strong>Declarative</strong>(声明式)和 <strong>Scripted Pipeline</strong>(脚本式)语法</p> 
<p>Pipeline 也有两种创建方法：</p> 
<ul><li>可以直接在 Jenkins 的 Web UI 界面中输入脚本；</li><li>也可以通过创建一个 Jenkinsﬁle 脚本文件放入项目源码库中（一般我们都推荐在 Jenkins 中直接从源代码控制(SCM)中直接载入 Jenkinsﬁle Pipeline 这种方法）。</li></ul> 
<h3><a name="t42"></a><a id="Pipeline_914"></a>安装Pipeline插件</h3> 
<p>Manage Jenkins-&gt;Manage Plugins-&gt;可选插件–&gt;安装<code>Pipeline</code></p> 
<p>安装插件后，创建项目的时候多了“流水线”类型</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/e32e1fb54e1be6ad5f49a3e45108111e.png" alt="img"></p> 
<h3><a name="t43"></a><a id="Pipeline_923"></a>Pipeline语法快速入门</h3> 
<h3><a name="t44"></a><a id="1DeclarativePipeline_925"></a>1）Declarative<code>声明式Pipeline</code></h3> 
<p>创建项目</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/0f80d8f53b0fb3bd2e713a6f225d34de.png" alt="img"></p> 
<p>流水线-&gt;选择HelloWorld模板</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/194f27c2223d5c112569f98f01c38ceb.png" alt="img"></p> 
<p>生成内容如下：</p> 
<pre class="prettyprint"><code class="prism language-json has-numbering" onclick="mdcp.signin(event)" style="position: unset;">pipeline <span class="token punctuation">{<!-- --></span>
    agent any
    stages <span class="token punctuation">{<!-- --></span>
        <span class="token function">stage</span><span class="token punctuation">(</span><span class="token string">'Hello'</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            steps <span class="token punctuation">{<!-- --></span>
                echo <span class="token string">'Hello World'</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
	<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li></ul></pre> 
<ul><li>stages：代表整个流水线的所有执行阶段。通常stages只有1个，里面包含多个stage</li><li>stage：代表流水线中的某个阶段，可能出现n个。一般分为拉取代码，编译构建，部署等阶段。</li><li>steps：代表一个阶段内需要执行的逻辑。steps里面是shell脚本，git拉取代码，ssh远程发布等任意内容。</li></ul> 
<p>编写一个简单声明式Pipeline：</p> 
<pre class="prettyprint"><code class="prism language-JSON has-numbering" onclick="mdcp.signin(event)" style="position: unset;">pipeline {
   agent any
   stages {
       stage('拉取代码') {
           steps {
               echo '拉取代码'
           }
       } 
       stage('编译构建') {
           steps {
               echo '编译构建'
           }
       } 
       stage('项目部署') {
           steps {
               echo '项目部署'
           }
       }
   }
}
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li></ul></pre> 
<p>点击构建，可以看到整个构建过程</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/65645f81e01af4813b6f1e6b867a0786.png" alt="img"> |</p> 
<h5><a id="apull_stage_985"></a>a)生成一个pull stage</h5> 
<blockquote> 
 <p>可以在流水线语法里选择 片段生成器</p> 
 <p>然后选择checkout from version controller，拉取代码</p> 
 <p>选择类型为git，填写好git项目地址，填写拉取分支名字</p> 
 <p>生成流水线脚本，脚本里就包含了凭证信息</p> 
 <p>填写到流水线中后，点击保存—构建—就看到了拉取的日志</p> 
</blockquote> 
<h5><a id="bstage_997"></a>b)生成一个构建stage</h5> 
<blockquote> 
 <p>或者选择sh：shell script</p> 
 <p>输入mvc clean package，点击生成脚本，然后再把该片段复制到流水线中去</p> 
 <p>保存后再构建</p> 
</blockquote> 
<h5><a id="cstage_1005"></a>c)生成一个部署stage</h5> 
<blockquote> 
 <p>还是在代码生成器里选择deploy</p> 
 <p>填写WAR files：targer/*.war</p> 
 <p>选择tomcat9远程，然后填写tomcat的地址就可远程部署</p> 
 <p>还可以注意到是可以同时部署多台tomcat</p> 
</blockquote> 
<h3><a name="t45"></a><a id="2_ScriptedPipeline_1015"></a>2） Scripted<code>脚本式Pipeline</code></h3> 
<blockquote> 
 <p>前面都是放到Jenkins UI界面，但它他无法做脚本备份、回退等</p> 
 <p>推荐把脚本放到IDEA项目下</p> 
</blockquote> 
<p>创建流水线项目</p> 
<p>这次选择"Scripted Pipeline"</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/194f27c2223d5c112569f98f01c38ceb.png" alt="img"></p> 
<ul><li>Node：节点，一个 Node 就是一个 Jenkins 节点，Master 或者 Agent，是执行 Step 的具体运行环境，后续讲到Jenkins的Master-Slave架构的时候用到。</li><li>Stage：阶段，一个 Pipeline 可以划分为若干个 Stage，每个 Stage 代表一组操作，比如：Build、Test、Deploy，Stage 是一个逻辑分组的概念。</li><li>Step：步骤，Step 是最基本的操作单元，可以是打印一句话，也可以是构建一个 Docker 镜像，由各类 Jenkins 插件提供，比如命令：sh ‘make’，就相当于我们平时 shell 终端中执行 make 命令一样。</li></ul> 
<p>编写一个简单的脚本式Pipeline</p> 
<pre class="prettyprint"><code class="prism language-JSON has-numbering" onclick="mdcp.signin(event)" style="position: unset;">node {
    def mvnHome
    stage('拉取代码') { // for display purposes
        echo '拉取代码'
    } 
	stage('编译构建') {
        echo '编译构建'
    } 
	stage('项目部署') {
    	echo '项目部署'
	}
}
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li></ul></pre> 
<p>目的：构建结果和声明式一样！</p> 
<p><strong>拉取代码</strong></p> 
<pre class="prettyprint"><code class="prism language-JSON has-numbering" onclick="mdcp.signin(event)" style="position: unset;">pipeline{
    agentanystages{
        stage('拉取代码'){
            steps{
                checkout([
                    $class: 'GitSCM',
                    branches: [ [name: '*/master'] ],
                    doGenerateSubmoduleConfigurations: false,
                    extensions: [ ],
                    submoduleCfg: [],
                    userRemoteConfigs: [
                        [
                            credentialsId: '68f2087f-a034-4d39-a9ff-1f776dd3dfa8',
                            url: 'git@192.168.66.100: itheima_group/web_demo.git'
                        ]
                    ]
                ])
            }
        }
    }
}
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li></ul></pre> 
<p>编译打包</p> 
<pre class="prettyprint"><code class="prism language-JSON has-numbering" onclick="mdcp.signin(event)" style="position: unset;">pipeline{
    agentanystages{
        stage('拉取代码'){
            steps{
                checkout([
                    $class: 'GitSCM',
                    branches: [[ name: '*/master' ] ],
                    doGenerateSubmoduleConfigurations: false,
                    extensions: [
                    ],
                    submoduleCfg: [
                    ],
                    userRemoteConfigs: [
                        [
                            credentialsId: '68f2087f-a034-4d39-a9ff-1f776dd3dfa8',
                            url: 'git@192.168.66.100: itheima_group/web_demo.git'
                        ]
                    ]
                ])
            }
        }stage('编译构建'){
            steps{
                shlabel: '',
                script: 'mvncleanpackage'
            }
        }
    }
}
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li></ul></pre> 
<p><strong>部署</strong></p> 
<pre class="prettyprint"><code class="prism language-JSON has-numbering" onclick="mdcp.signin(event)" style="position: unset;">pipeline{
    agentanystages{
        stage('拉取代码'){
            steps{
                checkout([
                    $class: 'GitSCM',
                    branches: [ [name: '*/master']],
                    doGenerateSubmoduleConfigurations: false,
                    extensions: [ ],
                    submoduleCfg: [ ],
                    userRemoteConfigs: [
                        [
                            credentialsId: '68f2087f-a034-4d39-a9ff-1f776dd3dfa8',
                            url: 'git@192.168.66.100: itheima_group/web_demo.git'
                        ]
                    ]
                ])
            }
        }stage('编译构建'){
            steps{
                shlabel: '',
                script: 'mvncleanpackage'
            }
        }stage('项目部署'){
            steps{
                deployadapters: [
                    tomcat8(credentialsId: 'afc43e5e-4a4e-4de6-984fb1d5a254e434',
                    path: '',
                    url: 'http: //192.168.66.102: 8080')
                ],
                contextPath: null,
                war: 'target/*.war'
            }
        }
    }
}
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li></ul></pre> 
<p><strong>Pipeline Script from SCM</strong></p> 
<p>刚才我们都是直接在Jenkins的UI界面编写Pipeline代码，这样不方便脚本维护，建议把Pipeline脚本放在项目中（一起进行版本控制）</p> 
<p>1）在项目根目录建立<code>Jenkinsﬁle</code>文件，把内容复制到该文件中</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/402b150c0c90607b0a720b4e155e05dc.png" alt="img"></p> 
<p><mark>把Jenkinsﬁle上传到Gitlab</mark></p> 
<blockquote> 
 <p>先传一下</p> 
</blockquote> 
<p>2）在项目中引用该文件</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/46c05667e4bf99812de42689231b2feb.png" alt="img"></p> 
<p>点击构建，就开始拉取，拉取后拿到Jenkins后操作</p> 
<h2><a name="t46"></a><a id="Jenkins_1170"></a>Jenkins项目构建细节</h2> 
<h3><a name="t47"></a><a id="1_1172"></a>1-常用的构建触发器</h3> 
<blockquote> 
 <p>前面都是手动点击触发</p> 
</blockquote> 
<p>Jenkins内置4种构建触发器：</p> 
<ul><li>触发远程构建</li><li>其他工程构建后触发（Build after other projects are build）</li><li>定时构建（Build periodically）</li><li>轮询SCM（Poll SCM）</li></ul> 
<h5><a id="1_1183"></a>1）触发远程构建</h5> 
<p>在Jenkins工程下点击配置，然后构建触发器</p> 
<p>别的系统发送URL请求，就可以让Jenkins开始构建（触发构建）</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/ede04163bf5ed3cb1246c13e207acea3.png" alt="img"></p> 
<p>触发构建url：http://192.168.66.101:8888/job/web_demo_pipeline/build?token=6666</p> 
<h5><a id="2_1195"></a>2）其他工程构建后触发</h5> 
<blockquote> 
 <p>需求：当前项目需要前一个项目构建完成后才能触发</p> 
</blockquote> 
<p>1）创建pre_job流水线工程，我们想让他构建完成后触发当前项目</p> 
<p>在pre_job的构建中随便写点东西</p> 
<p>2）配置需要触发的工程</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/9858699986ee85d5c2408e1cbb4d6cef.png" alt="img"></p> 
<h5><a id="3_1208"></a>3）定时构建</h5> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/0e8194cd1a45f82c61b830b83e79781a.png" alt="img"></p> 
<p>定时字符串从左往右分别为： 分 时 日 月 周</p> 
<p>一些定时表达式的例子：</p> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">每30分钟构建一次：H代表形参 H/30 * * * * 10:02 10:32

每2个小时构建一次: H H/2 * * *

每天的8点，12点，22点，一天构建3次： (多个时间点中间用逗号隔开) 0 8,12,22 * * *

每天中午12点定时构建一次 H 12 * * *

每天下午18点定时构建一次 H 18 * * *

在每个小时的前半个小时内的每10分钟 H(0-29)/10 * * * *

每两小时一次，每个工作日上午9点到下午5点(也许是上午10:38，下午12:38，下午2:38，下午4:38) H H(9-16)/2 * * 1-5
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li></ul></pre> 
<h5><a id="4SCM_1234"></a>4）轮询SCM</h5> 
<p>轮询SCM，是指定时扫描本地代码仓库的代码是否有变更，如果代码有变更就触发项目构建。</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/361c32ca88a837ae3a3b8bb2a8380db4.png" alt="img"></p> 
<blockquote> 
 <p>注意：这次构建触发器，Jenkins会定时扫描本地整个项目的代码，增大系统的开销，不建议使用轮询SCM。</p> 
</blockquote> 
<h3><a name="t48"></a><a id="2Git_hook_1242"></a>2-Git hook自动触发构建</h3> 
<p>刚才我们看到在Jenkins的内置构建触发器中，轮询SCM可以实现Gitlab代码更新，项目自动构建，但是该方案的性能不佳。那有没有更好的方案呢？</p> 
<p>有的。就是利用Gitlab的webhook实现<strong>代码push到仓库，立即触发项目自动构建</strong>。</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/7c575cc62cd1ef0f39fb517e579c9b61.png" alt="img"></p> 
<p>需要安装GitlabHook插件：需要安装两个插件： Gitlab Hook和GitLab</p> 
<h5><a id="Jenkins_1253"></a>Jenkins设置自动构建</h5> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/7499fa7b1bd41f02fc7b18e90a593fc2.png" alt="img"></p> 
<p>等会需要把生成的webhook URL配置到Gitlab中。</p> 
<h5><a id="Gitlabwebhook_1259"></a>Gitlab配置webhook</h5> 
<p>1）开启webhook功能</p> 
<p>使用root账户登录到后台，点击Admin Area -&gt; Settings -&gt; Network</p> 
<p>勾选"Allow requests to the local network from web hooks and services" 让网络钩子允许请求本地网络</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/d141224ab4922c1e02c49fdfe54bedd9.png" alt="img"></p> 
<p>2）在项目添加webhook</p> 
<p>点击项目-&gt;Settings-&gt;Integrations</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/5984c268e18922e3de887adaf1d584a2.png" alt="img"></p> 
<p>注意：以下设置必须完成，否则会报错！</p> 
<p>在Jenkins中，Manage Jenkins-&gt;Conﬁgure System</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/382093cee2597d9990ee111babc36b21.png" alt="img"></p> 
<h3><a name="t49"></a><a id="3Jenkins_1283"></a>3-Jenkins的参数化构建</h3> 
<p>有时在项目构建的过程中，我们需要根据用户的输入 动态传入一些参数，从而影响整个构建结果，这时我们可以使用参数化构建。</p> 
<blockquote> 
 <p>比如在原来Jenkinsfile中只指定了master分支，那么如何用参数替换分支呢？</p> 
</blockquote> 
<p>Jenkins支持非常丰富的参数类型</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/e7484e7b60f5b6d15bb972ecfa26b4b6.png" alt="img"></p> 
<p>接下来演示通过输入gitlab项目的分支名称来部署不同分支项目。</p> 
<p>项目创建分支，并推送到Gitlab上</p> 
<p>新建分支：v1，代码稍微改动下，然后提交到gitlab上。这时看到gitlab上有一个两个分支：master和v1</p> 
<h5><a id="Jenkins_1299"></a>在Jenkins添加字符串类型参数</h5> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/d005bd9c56d8d02c5e115c598daa88ce.png" alt="img"></p> 
<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210624003127.jpg" alt="img"> 
<p>改动pipeline流水线代码</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/67578b35add1f02bef8fa54988b500da.png" alt="img"></p> 
<p>点击Build with Parameters，就用指定参数开始了构建</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/37d114a1095b50304793de9637d6c017.png" alt="img"></p> 
<p>输入分支名称，构建即可！构建完成后访问Tomcat查看结果</p> 
<h3><a name="t50"></a><a id="4_1317"></a>4-配置邮箱服务器发送构建结果</h3> 
<h5><a id="Email_Extension_template_1319"></a>安装Email Extension插件 template</h5> 
<p>Jenkins设置邮箱相关参数</p> 
<p>Manage Jenkins-&gt;Conﬁgure System</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/95e9608e87ba06c664f7d7d0c24d4f4f.png" alt="img"></p> 
<p>设置邮件参数</p> 
<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210624003756.png"> 
<blockquote> 
 <p>这个邮箱是发件人</p> 
</blockquote> 
<p>设置Jenkins默认邮箱信息</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/76141caf4577caf3b39c93fac08438f8.png" alt="img"></p> 
<h5><a id="_1338"></a>准备邮件内容</h5> 
<p>在项目根目录编写email.html，并把文件推送到Gitlab，内容如下：</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/7ee7e21bf037b0b588ccf7f80eb43ded.png" alt="img"></p> 
<p>具体有什么值，可以在Jenkins—管理----系统配置-------content token reference</p> 
<pre class="prettyprint"><code class="prism language-HTML has-numbering" onclick="mdcp.signin(event)" style="position: unset;">&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;meta charset="UTF-8"&gt;
        &lt;title&gt;${ENV, var="JOB_NAME"}-第${BUILD_NUMBER}次构建日志&lt;/title&gt;
    &lt;/head&gt;
    &lt;body leftmargin="8" marginwidth="0" topmargin="8" marginheight="4"
          offset="0"&gt;
        &lt;table width="95%" cellpadding="0" cellspacing="0"
               style="font-size: 11pt; font-family: Tahoma, Arial, Helvetica, sansserif"&gt;
            &lt;tr&gt;
                &lt;td&gt;(本邮件是程序自动下发的，请勿回复！)&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td&gt;&lt;h2&gt;
                    &lt;font color="#0000FF"&gt;构建结果 - ${BUILD_STATUS}&lt;/font&gt;
                    &lt;/h2&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td&gt;&lt;br /&gt;
                    &lt;b&gt;&lt;font color="#0B610B"&gt;构建信息&lt;/font&gt;&lt;/b&gt;
                    &lt;hr size="2" width="100%" align="center" /&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td&gt;
                    &lt;ul&gt;
                        &lt;li&gt;项目名称&amp;nbsp;：&amp;nbsp;${PROJECT_NAME}&lt;/li&gt;
                        &lt;li&gt;构建编号&amp;nbsp;：&amp;nbsp;第${BUILD_NUMBER}次构建&lt;/li&gt;
                        &lt;li&gt;触发原因：&amp;nbsp;${CAUSE}&lt;/li&gt;
                        &lt;li&gt;构建日志：&amp;nbsp;&lt;a
                                          href="${BUILD_URL}console"&gt;${BUILD_URL}console&lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;构建&amp;nbsp;&amp;nbsp;Url&amp;nbsp;：&amp;nbsp;&lt;a
                                                             href="${BUILD_URL}"&gt;${BUILD_URL}&lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;工作目录&amp;nbsp;：&amp;nbsp;&lt;a
                                                href="${PROJECT_URL}ws"&gt;${PROJECT_URL}ws&lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;项目&amp;nbsp;&amp;nbsp;Url&amp;nbsp;：&amp;nbsp;&lt;a
                                                             href="${PROJECT_URL}"&gt;${PROJECT_URL}&lt;/a&gt;&lt;/li&gt;
                    &lt;/ul&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td&gt;&lt;b&gt;&lt;font color="#0B610B"&gt;Changes Since Last
                    Successful Build:&lt;/font&gt;&lt;/b&gt;
                    &lt;hr size="2" width="100%" align="center" /&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td&gt;
                    &lt;ul&gt;
                        &lt;li&gt;历史变更记录 : &lt;a
                                        href="${PROJECT_URL}changes"&gt;${PROJECT_URL}changes&lt;/a&gt;&lt;/li&gt;
                    &lt;/ul&gt; ${CHANGES_SINCE_LAST_SUCCESS,reverse=true, format="Changes for
                    Build #%n:&lt;br /&gt;%c&lt;br /&gt;",showPaths=true,changesFormat="&lt;pre&gt;[%a]&lt;br
/&gt;%m&lt;/pre&gt;",pathFormat="&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;%p"}
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td&gt;&lt;b&gt;Failed Test Results&lt;/b&gt;
                    &lt;hr size="2" width="100%" align="center" /&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td&gt;&lt;pre
                         style="font-size: 11pt; font-family: Tahoma, Arial, Helvetica,
                    sans-serif"&gt;$FAILED_TESTS&lt;/pre&gt;
                    &lt;br /&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td&gt;&lt;b&gt;&lt;font color="#0B610B"&gt;构建日志 (最后 100行):&lt;/font&gt;&lt;/b&gt;
                    &lt;hr size="2" width="100%" align="center" /&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td&gt;&lt;textarea cols="80" rows="30" readonly="readonly"
                              style="font-family: Courier New"&gt;${BUILD_LOG,
                    maxLines=100}&lt;/textarea&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
        &lt;/table&gt;
    &lt;/body&gt;
&lt;/html&gt;
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li><li style="color: rgb(153, 153, 153);">40</li><li style="color: rgb(153, 153, 153);">41</li><li style="color: rgb(153, 153, 153);">42</li><li style="color: rgb(153, 153, 153);">43</li><li style="color: rgb(153, 153, 153);">44</li><li style="color: rgb(153, 153, 153);">45</li><li style="color: rgb(153, 153, 153);">46</li><li style="color: rgb(153, 153, 153);">47</li><li style="color: rgb(153, 153, 153);">48</li><li style="color: rgb(153, 153, 153);">49</li><li style="color: rgb(153, 153, 153);">50</li><li style="color: rgb(153, 153, 153);">51</li><li style="color: rgb(153, 153, 153);">52</li><li style="color: rgb(153, 153, 153);">53</li><li style="color: rgb(153, 153, 153);">54</li><li style="color: rgb(153, 153, 153);">55</li><li style="color: rgb(153, 153, 153);">56</li><li style="color: rgb(153, 153, 153);">57</li><li style="color: rgb(153, 153, 153);">58</li><li style="color: rgb(153, 153, 153);">59</li><li style="color: rgb(153, 153, 153);">60</li><li style="color: rgb(153, 153, 153);">61</li><li style="color: rgb(153, 153, 153);">62</li><li style="color: rgb(153, 153, 153);">63</li><li style="color: rgb(153, 153, 153);">64</li><li style="color: rgb(153, 153, 153);">65</li><li style="color: rgb(153, 153, 153);">66</li><li style="color: rgb(153, 153, 153);">67</li><li style="color: rgb(153, 153, 153);">68</li><li style="color: rgb(153, 153, 153);">69</li><li style="color: rgb(153, 153, 153);">70</li><li style="color: rgb(153, 153, 153);">71</li><li style="color: rgb(153, 153, 153);">72</li><li style="color: rgb(153, 153, 153);">73</li><li style="color: rgb(153, 153, 153);">74</li><li style="color: rgb(153, 153, 153);">75</li><li style="color: rgb(153, 153, 153);">76</li><li style="color: rgb(153, 153, 153);">77</li><li style="color: rgb(153, 153, 153);">78</li></ul></pre> 
<h5><a id="Jenkinsle_1427"></a>编写Jenkinsﬁle添加构建后发送邮件</h5> 
<pre class="prettyprint"><code class="prism language-json has-numbering" onclick="mdcp.signin(event)" style="position: unset;">pipeline <span class="token punctuation">{<!-- --></span>
    agent any
    stages <span class="token punctuation">{<!-- --></span>
    <span class="token function">stage</span><span class="token punctuation">(</span><span class="token string">'拉取代码'</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        steps <span class="token punctuation">{<!-- --></span>
        <span class="token function">checkout</span><span class="token punctuation">(</span><span class="token punctuation">[</span>$<span class="token keyword">class</span><span class="token punctuation">:</span> <span class="token string">'GitSCM'</span><span class="token punctuation">,</span>
        branches<span class="token punctuation">:</span> <span class="token punctuation">[</span><span class="token punctuation">[</span>name<span class="token punctuation">:</span> <span class="token string">'*/master'</span><span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
doGenerateSubmoduleConfigurations<span class="token punctuation">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span> 
extensions<span class="token punctuation">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span> 
submoduleCfg<span class="token punctuation">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
userRemoteConfigs<span class="token punctuation">:</span> <span class="token punctuation">[</span><span class="token punctuation">[</span>credentialsId<span class="token punctuation">:</span> <span class="token string">'68f2087f-a034-4d39-a9ff-1f776dd3dfa8'</span><span class="token punctuation">,</span>
                     url<span class="token punctuation">:</span> <span class="token string">'git@192.168.66.100:itheima_group/web_demo.git'</span><span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span> 
<span class="token function">stage</span><span class="token punctuation">(</span><span class="token string">'编译构建'</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    steps <span class="token punctuation">{<!-- --></span>
    sh label<span class="token punctuation">:</span> <span class="token string">''</span><span class="token punctuation">,</span> script<span class="token punctuation">:</span> <span class="token string">'mvn clean package'</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span> <span class="token function">stage</span><span class="token punctuation">(</span><span class="token string">'项目部署'</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
    steps <span class="token punctuation">{<!-- --></span>测试
    <span class="token constant">PS</span>：邮件相关全局参数参考列表：
    系统设置<span class="token operator">-</span><span class="token operator">&gt;</span>Extended <span class="token constant">E</span><span class="token operator">-</span>mail Notification<span class="token operator">-</span><span class="token operator">&gt;</span>Content Token Reference，点击旁边的<span class="token operator">?</span>号
    deploy adapters<span class="token punctuation">:</span> <span class="token punctuation">[</span><span class="token function">tomcat8</span><span class="token punctuation">(</span>credentialsId<span class="token punctuation">:</span> <span class="token string">'afc43e5e-4a4e-4de6-984fb1d5a254e434'</span><span class="token punctuation">,</span> path<span class="token punctuation">:</span> <span class="token string">''</span><span class="token punctuation">,</span> 
    url<span class="token punctuation">:</span> <span class="token string">'http://192.168.66.102:8080'</span><span class="token punctuation">)</span><span class="token punctuation">]</span><span class="token punctuation">,</span> contextPath<span class="token punctuation">:</span> <span class="token keyword">null</span><span class="token punctuation">,</span>
war<span class="token punctuation">:</span> <span class="token string">'target/*.war'</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span>

post <span class="token punctuation">{<!-- --></span>  # 主要看这就行
      always <span class="token punctuation">{<!-- --></span>
      <span class="token function">emailext</span><span class="token punctuation">(</span>
          subject<span class="token punctuation">:</span> <span class="token string">'构建通知：${PROJECT_NAME} - Build # ${BUILD_NUMBER} -${BUILD_STATUS}!'</span><span class="token punctuation">,</span>
          body<span class="token punctuation">:</span> <span class="token string">'${FILE,path="email.html"}'</span><span class="token punctuation">,</span>
          to<span class="token punctuation">:</span> <span class="token string">'xxx@qq.com'</span>
      <span class="token punctuation">)</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li></ul></pre> 
<blockquote> 
 <p>这个post可以到声明式脚本生成器里选择post，选择对应的conditions，比如选择永远都执行等等，他和stage是分开的</p> 
</blockquote> 
<p><strong>测试</strong></p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/55aad6dcf7876add64205c82ca89174d.png" alt="img"></p> 
<p>PS：邮件相关全局参数参考列表：</p> 
<p>系统设置-&gt;Extended E-mail Notiﬁcation-&gt;Content Token Reference，点击旁边的?号</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/0d1a77113369542a949c73da8ffe1396.png" alt="img"></p> 
<h2><a name="t51"></a><a id="JenkinsSonarQube1__SonarQube_1483"></a>Jenkins+<code>SonarQube</code>代码审查(1) - 安装SonarQube</h2> 
<h3><a name="t52"></a><a id="SonaQube_1485"></a>SonaQube简介</h3> 
<p>SonarQube是一个用于管理代码质量的开放平台，可以快速的定位代码中潜在的或者明显的错误。目前支持java,C#,C/C++,Python,PL/SQL,Cobol,JavaScrip,Groovy等二十几种编程语言的代码质量管理与检测。</p> 
<p>官网：https://www.sonarqube.org/</p> 
<p><strong>环境要求</strong></p> 
<div class="table-box"><table><thead><tr><th>软件</th><th>服务器</th><th>版本</th></tr></thead><tbody><tr><td>JDK</td><td>192.168.66.101</td><td>1.8</td></tr><tr><td>MySQL</td><td>192.168.66.101</td><td>5.7</td></tr><tr><td>SonarQube</td><td>192.168.66.101</td><td>6.7.4</td></tr></tbody></table></div>
<h4><a id="SonarQube_1502"></a>安装SonarQube</h4> 
<p>1）安装MySQL（会把一些代码审查的结果保存到数据库）</p> 
<p>2）安装SonarQube</p> 
<p>在MySQL创建sonar数据库</p> 
<pre class="prettyprint"><code class="prism language-SH has-numbering" onclick="mdcp.signin(event)" style="position: unset;">create database sonar;
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li></ul></pre> 
<p>下载sonar压缩包： https://www.sonarqube.org/downloads/</p> 
<p>解压sonar，并设置权限</p> 
<pre class="prettyprint"><code class="prism language-SH has-numbering" onclick="mdcp.signin(event)" style="position: unset;">yum install unzip
unzip sonarqube-6.7.4.zip #解压
mkdir /opt/sonar #创建目录
mv sonarqube-6.7.4/* /opt/sonar #移动文件

useradd sonar #创建sonar用户，必须sonar用于启动，否则报错
chown -R sonar. /opt/sonar #更改sonar目录及文件权限修改sonar配置文件

vi  /opt/sonarqube-6.7.4/conf/sonar.properties
内容如下：

sonar.jdbc.username=root  sonar.jdbc.password=Root@123
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&amp;characterEncoding=utf8&amp;rewriteBatchedStatements=true&amp;useConﬁgs= maxPerformance&amp;useSSL=false

注意：sonar默认监听9000端口，如果9000端口被占用，需要更改。启动sonar

cd /opt/sonarqube-6.7.4

su sonar ./bin/linux-x86-64/sonar.sh start 启动
su sonar ./bin/linux-x86-64/sonar.sh status 查看状态
su sonar ./bin/linux-x86-64/sonar.sh stop 停止

tail -f logs/sonar.logs 查看日志访问sonar http://192.168.66.101:9000
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li></ul></pre> 
<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210624005312.jpg" alt="img"> 
<p>默认账户：admin/admin创建token</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/be000254a2f5f85246246331a8a0c024.png" alt="img"></p> 
<p>bb8b6c53d9d921e101343cef0395243e6c1dc8a3</p> 
<p>token要记下来后面要使用</p> 
<h2><a name="t53"></a><a id="JenkinsSonarQube2___1556"></a>Jenkins+SonarQube代码审查(2) - 实现代码审查</h2> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/57e1b17408e341310d7431a1452f4c6d.png" alt=""></p> 
<p>安装SonarQube Scanner插件</p> 
<p>Jenkins进行SonarQube配置</p> 
<p>Manage Jenkins-&gt;Conﬁgure System-&gt;SonarQube servers</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/96a341cc4e69e6b6b3bd8d7ffc7795a8.png" alt=""></p> 
<p>Manage Jenkins-&gt;Global Tool Conﬁguration</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/c2557a4671c0ef02e094df8b6a8d2b02.png" alt="img"></p> 
<p>，然后在Global Tool Configuration里点击新增SonarQube Scanner，点击install automatically，点击保存</p> 
<p>然后在configure system里，点击SonaQube Servers，添加之前安装的sonarQube的地址，localhost:9000</p> 
<p>添加SonarQube凭证，这里要填写之前保存的那个秘钥</p> 
<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210624005354.png"> 
<h5><a id="SonaQubeSCM_1586"></a>SonaQube关闭审查结果上传到SCM功能</h5> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/8b76234bf7e4f889581f759dd16421d1.png" alt="img"></p> 
<h5><a id="SonaQube_1590"></a>在项目添加SonaQube代码审查（非流水线项目）</h5> 
<blockquote> 
 <p>maven或freestyle</p> 
</blockquote> 
<p>在Jenkins中点击之前的<strong>freestyle项目</strong> ---- 配置 ---- 可以看到之前写的构建shell，添加构建步骤----Execute SonarQube Scanner----</p> 
<ul><li>Task to run：：scan</li><li>jdk：在Jenkins里配置过的jdk</li><li>Analysis properties内容为：</li></ul> 
<pre class="prettyprint"><code class="prism language-SH has-numbering" onclick="mdcp.signin(event)" style="position: unset;"># must be unique in a given SonarQube instance
sonar.projectKey=web_demo
# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
sonar.projectName=web_demo
sonar.projectVersion=1.0
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
# This property is optional if sonar.modules is set.
# 扫描的路径
sonar.sources=.
sonar.exclusions=**/test/**,**/target/**
sonar.java.source=1.8
sonar.java.target=1.8
# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li></ul></pre> 
<p>在Jenkins里的freestyle项目点击构建，</p> 
<p>在项目里随便写个100/0，然后push，点击构建，在sonaQube里就能看到报错</p> 
<h5><a id="SonaQube_1621"></a>在项目添加SonaQube代码审查（流水线项目）</h5> 
<blockquote> 
 <p>pipeline</p> 
</blockquote> 
<p>1）IDEA项目根目录下，创建sonar-project.properties文件</p> 
<pre class="prettyprint"><code class="prism language-SH has-numbering" onclick="mdcp.signin(event)" style="position: unset;"># must be unique in a given SonarQube instance
sonar.projectKey=web_demo
# this is the name and version displayed in the SonarQube UI. Was mandatory
prior to SonarQube 6.1.
sonar.projectName=web_demo
sonar.projectVersion=1.0
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
# This property is optional if sonar.modules is set.
sonar.sources=.
sonar.exclusions=**/test/**,**/target/**
sonar.java.source=1.8
sonar.java.target=1.8
# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li></ul></pre> 
<p>2）在DEA修改Jenkinsﬁle，加入SonarQube代码审查阶段</p> 
<pre class="prettyprint"><code class="prism language-JSON has-numbering" onclick="mdcp.signin(event)" style="position: unset;">pipeline{
    agentanystages{
        stage('拉取代码'){
            steps{
                checkout([
                    $class: 'GitSCM',
                    branches: [ [name: '*/master']],
                    doGenerateSubmoduleConfigurations: false,
                    extensions: [  ],
                    submoduleCfg: [],
                    userRemoteConfigs: [
                        [
                            credentialsId: '68f2087f-a034-4d39-a9ff-1f776dd3dfa8',
                            url: 'git@192.168.66.100: itheima_group/web_demo.git'
                        ]
                    ]
                ])
            }
        }stage('编译构建'){
            steps{
                shlabel: '',
                script: 'mvncleanpackage'
            }
        }stage('SonarQube代码审查'){
            steps{
                script{
                    scannerHome=tool'sonarqube-scanner'#tool代表要引入Jenkins的一些工具，'sonarqube-scanner'是之前我们自己起的名字#自由风格默认会找全局工具
                }withSonarQubeEnv('sonarqube6.7.4'){
                    #这个配置在系统配置里
                    sh"${scannerHome}/bin/sonar-scanner"
                }
            }
        }stage('项目部署'){
            #代码审查都放到项目部署之前
            steps{
                deployadapters: [
                    tomcat8(credentialsId: 'afc43e5e-4a4e-4de6-984fb1d5a254e434',
                    path: '',
                    url: 'http: //192.168.66.102: 8080')
                ],
                contextPath: null,
                war: 'target/*.war'
            }
        }
    }
	post{
        always{
            emailext(subject: '构建通知：${ PROJECT_NAME}-Build#${ BUILD_NUMBER}-${BUILD_STATUS}!',
            body: '${FILE, path="email.html"}',
            to: '1014671449@qq.com')
        }
    }
}
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li><li style="color: rgb(153, 153, 153);">40</li><li style="color: rgb(153, 153, 153);">41</li><li style="color: rgb(153, 153, 153);">42</li><li style="color: rgb(153, 153, 153);">43</li><li style="color: rgb(153, 153, 153);">44</li><li style="color: rgb(153, 153, 153);">45</li><li style="color: rgb(153, 153, 153);">46</li><li style="color: rgb(153, 153, 153);">47</li><li style="color: rgb(153, 153, 153);">48</li><li style="color: rgb(153, 153, 153);">49</li><li style="color: rgb(153, 153, 153);">50</li><li style="color: rgb(153, 153, 153);">51</li><li style="color: rgb(153, 153, 153);">52</li><li style="color: rgb(153, 153, 153);">53</li></ul></pre> 
<p>3）到SonarQube的UI界面查看审查结果</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/d2fbb4961f520bf32dcff0b90825cf81.png" alt="img"></p> 
<h1><a name="t54"></a><a id="JenkinsDockerSpringCloud_1714"></a>四、Jenkins+Docker+SpringCloud微服务持续集成(上)</h1> 
<h3><a name="t55"></a><a id="JKDockerCloud_1716"></a>JK+Docker+Cloud持续集成流程说明</h3> 
<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210624005738.jpg" alt="img"> 
<p>大致流程说明：</p> 
<p>1）开发人员每天把代码提交到Gitlab代码仓库</p> 
<p>2） Jenkins从Gitlab中拉取项目源码，编译并打成jar包，然后构建成Docker镜像，将镜像上传到Harbor私有仓库。</p> 
<p>3） Jenkins发送SSH远程命令，让生产部署服务器到Harbor私有仓库拉取镜像到本地，然后创建容器。</p> 
<p>4）最后，用户可以访问到容器</p> 
<p><strong>服务列表</strong>(红色的软件为需要安装的软件，黑色代表已经安装)</p> 
<div class="table-box"><table><thead><tr><th><strong>服务器名称</strong></th><th>IP地址</th><th>**安装的软件</th></tr></thead><tbody><tr><td>代码托管服务器</td><td>192.168.66.100</td><td>Gitlab</td></tr><tr><td>持续集成服务器</td><td>192.168.66.101</td><td>Jenkins，Maven，Docker18.06.1-ce</td></tr><tr><td>Docker仓库服务器</td><td>192.168.66.102</td><td>Docker18.06.1-ce，Harbor1.9.2</td></tr><tr><td>生产部署服务器</td><td>192.168.66.103</td><td>Docker18.06.1-ce</td></tr></tbody></table></div>
<h3><a name="t56"></a><a id="SpringCloud_1743"></a>SpringCloud微服务源码概述</h3> 
<p>项目架构：前后端分离</p> 
<p>后端技术栈：SpringBoot+SpringCloud+SpringDataJpa（Spring全家桶）微服务项目结构：</p> 
<ul><li>tensquare_parent：父工程，存放基础配置</li><li>tensquare_common：通用工程，存放工具类</li><li>tensquare_eureka_server：SpringCloud的Eureka注册中心</li><li>tensquare_zuul：SpringCloud的网关服务</li><li>tensquare_admin_service：基础权限认证中心，负责用户认证（使用JWT认证）。他yaml里有euraka和jdbc、jwt</li><li>tensquare_gathering：一个简单的业务模块，活动微服务相关逻辑</li></ul> 
<p>数据库结构：</p> 
<ul><li>tensquare_user：用户认证数据库，存放用户账户数据。对应tensquare_admin_service微服务</li><li>tensquare_gathering：活动微服务数据库。对应tensquare_gathering微服务</li></ul> 
<p>微服务配置分析：启动顺序</p> 
<ul><li>tensquare_eureka</li><li>tensquare_zuul</li><li>tensquare_admin_service</li><li>tensquare_gathering</li></ul> 
<p>默认不能的登录，所以线通过网关进行登录，发送post请求进行登录</p> 
<h3><a name="t57"></a><a id="1SpringCloud_1770"></a>本地部署(1)-SpringCloud微服务部署</h3> 
<h4><a id="_1772"></a>本地运行微服务</h4> 
<p>1）逐一启动微服务</p> 
<p>2）使用postman测试功能是否可用</p> 
<h4><a id="_1780"></a>本地部署微服务</h4> 
<p>mvn clean package</p> 
<p>此时打成的jar包里面没有maven里的依赖，所以不能独立启动</p> 
<p>所以spring cloud可以boot的maven插件进行打包</p> 
<p>1）SpringBoot微服务项目打包必须导入该插件</p> 
<pre class="prettyprint"><code class="prism language-xml has-numbering" onclick="mdcp.signin(event)" style="position: unset;"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>plugin</span><span class="token punctuation">&gt;</span></span>
	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>groupId</span><span class="token punctuation">&gt;</span></span>org.springframework.boot<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>groupId</span><span class="token punctuation">&gt;</span></span>
	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>artifactId</span><span class="token punctuation">&gt;</span></span>spring-boot-maven-plugin<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>artifactId</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>plugin</span><span class="token punctuation">&gt;</span></span>
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li></ul></pre> 
<p>mvn clean package 打包后在target下产生jar包</p> 
<p>2）本地运行微服务的jar包 java -jar xxx.jar</p> 
<p>3）查看效果</p> 
<h3><a name="t58"></a><a id="2web_1805"></a>本地部署(2)-前端静态web网站</h3> 
<p>前端技术栈：NodeJS+VueJS+ElementUI</p> 
<p>使用Visual Studio Code打开源码 ，一般在env.js中改一下java后台的网关地址</p> 
<p>1）本地运行</p> 
<p>npm run dev</p> 
<p>2）打包静态web网站</p> 
<p>npm run build</p> 
<p>打包后，产生dist目录的静态文件</p> 
<p>3）部署到nginx服务器</p> 
<p>把dist目录的静态文件拷贝到nginx的html目录，启动nginx</p> 
<p>4）启动nginx，并访问</p> 
<p>http://localhost:82</p> 
<h2><a name="t59"></a><a id="1Docker_1831"></a>环境准备(1)-<code>Docker</code>快速入门</h2> 
<h3><a name="t60"></a><a id="Docker_1833"></a>Docker简介</h3> 
<p>Docker 是一个开源的应用容器引擎，基于 Go 语言 并遵从 Apache2.0 协议开源。</p> 
<p>Docker 可以让开发者打包他们的应用以及依赖包到一个轻量级、可移植的容器中，然后发布到任何流行的 Linux 机器上，也可以实现虚拟化。</p> 
<p>容器是完全使用沙箱机制，相互之间不会有任何接口（类似 iPhone 的 app）,更重要的是容器性能开销极低。</p> 
<p>Docker容器技术 vs 传统虚拟机技术</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/a222b313ba5e7f7229c05c8f48d3f252.png" alt="img"></p> 
<div class="table-box"><table><thead><tr><th></th><th><strong>虚拟机</strong></th><th><strong>容器</strong></th></tr></thead><tbody><tr><td><strong>占用磁盘空间</strong></td><td>非常大，GB级</td><td>小，MB甚至KB级</td></tr><tr><td><strong>启动速度</strong></td><td>慢，分钟级</td><td>快，秒级</td></tr><tr><td><strong>运行形态</strong></td><td>运行于Hypervisor上</td><td>直接运行在宿主机内核上</td></tr><tr><td><strong>并发性</strong></td><td>一台宿主机上十几个，最多几十个</td><td>上百个，甚至数百上千个</td></tr><tr><td><strong>性能</strong></td><td>逊于宿主机</td><td>接近宿主机本地进程</td></tr><tr><td><strong>资源利用率</strong></td><td>低</td><td>高</td></tr></tbody></table></div>
<p>简单一句话总结：Docker技术就是让我们更加高效轻松地将任何应用在Linux服务器部署和使用。</p> 
<h4><a id="Docker_1860"></a>Docker安装</h4> 
<p>1）卸载旧版本</p> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">yum list installed | grep docker 列出当前所有docker的包

yum -y remove docker的包名称 卸载docker包
rm -rf /var/lib/docker 删除docker的所有镜像和容器
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li></ul></pre> 
<p>2）安装必要的软件包</p> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">sudo yum install -y yum-utils \ device-mapper-persistent-data \ lvm2 
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li></ul></pre> 
<p>3）设置下载的镜像仓库</p> 
<p><a href="https://download.docker.com/linux/centos/docker-ce.repo">sudo yum-conﬁg-manager \ --add-repo \ https://download.docker.com/linux/centos/docker- ce.repo</a></p> 
<p>4）列出需要安装的版本列表</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-7PU178Ze-1624726844525)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image073.gif)]yum list docker-ce --showduplicates | sort -r</p> 
<div class="table-box"><table><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td>docker-ce.x86_64</td><td>3:18.09.1-3.el7</td><td>docker-ce-stable</td></tr><tr><td>docker-ce.x86_64</td><td>3:18.09.0-3.el7</td><td>docker-ce-stable</td></tr><tr><td>docker-ce.x86_64</td><td>18.06.1.ce-3.el7</td><td>docker-ce-stable</td></tr><tr><td>docker-ce.x86_64</td><td>18.06.0.ce-3.el7</td><td>docker-ce-stable</td></tr><tr><td>…</td><td></td><td></td></tr></tbody></table></div>
<p>5）安装指定版本（这里使用18.0.1版本） sudo yum install docker-ce-18.06.1.ce</p> 
<p>6）查看版本 docker -v</p> 
<p>7）启动Docker</p> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">sudo systemctl start docker 启动

sudo systemctl enable docker 设置开机启动
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li></ul></pre> 
<p>8）添加阿里云镜像下载地址</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-UYKzaVfk-1624726844525)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image073.gif)]vi /etc/docker/daemon.json</p> 
<p>内容如下：</p> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">{ 
"registry-mirrors": ["https://zydiol88.mirror.aliyuncs.com"]
}
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li></ul></pre> 
<p>9）重启Docker</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-z5UCzbvX-1624726844526)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image073.gif)]sudo systemctl restart docker</p> 
<h4><a id="Docker_1925"></a>Docker基本命令</h4> 
<p>1）镜像命令</p> 
<p>镜像：相当于应用的安装包，在Docker部署的任何应用都需要先构建成为镜像</p> 
<pre class="prettyprint"><code class="prism language-shell has-numbering" onclick="mdcp.signin(event)" style="position: unset;">docker search <span class="token comment"># 镜像名称 搜索镜像 </span>
docker pull 镜像名称 <span class="token comment"># 拉取镜像 </span>
docker images <span class="token comment"># 查看本地所有镜像</span>
docker rmi -f 镜像名称 <span class="token comment">#删除镜像</span>
<span class="token comment"># 例子</span>
docker pull openjdk:8-jdk-alpine
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li></ul></pre> 
<p>2）容器命令</p> 
<p>容器：容器是由镜像创建而来。容器是Docker运行应用的载体，每个应用都分别运行在Docker的每个容器中。</p> 
<pre class="prettyprint"><code class="prism language-SH has-numbering" onclick="mdcp.signin(event)" style="position: unset;">docker run -i 镜像名称:标签 # 运行容器（默认是前台运行）

docker ps 查看运行的容器

docker ps -a 

查询所有容器常用的参数：
-i：运行容器
-d：后台守方式运行（守护式）
--name：给容器添加名称
-p：公开容器端口给当前宿主机 # 常用  外部:内部
-v：挂载目录


docker exec -it 容器ID/容器名称 /bin/bash  # 进入容器内部 
docker start/stop/restart  容器名称/ID  # 启动/停止/重启容器 
docker rm -f 容器名称/ID  # 删除容器
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li></ul></pre> 
<h2><a name="t61"></a><a id="2Dockerle_1964"></a>环境准备(2)-<code>Dockerﬁle</code>镜像脚本快速入门</h2> 
<h4><a id="Dockerle_1966"></a>Dockerﬁle简介</h4> 
<p>Dockerﬁle其实就是我们用来构建Docker镜像的源码，当然这不是所谓的编程源码，而是一些命令的组合，只要理解它的逻辑和语法格式，就可以编写Dockerﬁle了。</p> 
<p>简单点说，Dockerﬁle的作用：它可以让用户个性化定制Docker镜像。因为工作环境中的需求各式各样，网络上的镜像很难满足实际的需求。</p> 
<p>镜像构建示意图：</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/b852e8c33b8049fc35d64379c1fdee2d.png" alt="img"></p> 
<p>可以看到，新镜像是从基础镜像一层一层叠加生成的。每安装一个软件，就在现有镜像的基础上增加一层</p> 
<h4><a id="Dockerle_1978"></a>Dockerﬁle常见命令</h4> 
<div class="table-box"><table><thead><tr><th><strong>命令</strong></th><th><strong>作用</strong></th></tr></thead><tbody><tr><td>FROM image_name:tag</td><td></td></tr><tr><td>MAINTAINER user_name</td><td>声明镜像的作者</td></tr><tr><td>ENV key value</td><td>设置环境变量 (可以写多条)</td></tr><tr><td>RUN command</td><td>编译镜像时运行的脚本(可以写多条)</td></tr><tr><td>CMD</td><td>设置容器的启动命令（无法在运行中接收参数）</td></tr><tr><td>ENTRYPOINT</td><td>设置容器的入口程序（可以在运行中接收参数）</td></tr><tr><td>ADD source_dir/ﬁle dest_dir/ﬁle</td><td>将宿主机的文件复制到容器内，如果是一个压缩文件，将会在复制后自动解压</td></tr><tr><td>COPY source_dir/ﬁle dest_dir/ﬁle</td><td>和ADD相似，但是如果有压缩文件并不能解压</td></tr><tr><td>WORKDIR path_dir</td><td>设置工作目录</td></tr><tr><td>ARG</td><td>设置编译镜像时加入的参数</td></tr><tr><td>VOLUMN</td><td>设置容器的挂载卷/目录</td></tr></tbody></table></div>
<p>RUN、CMD、ENTRYPOINT的区别？</p> 
<ul><li>RUN：用于指定 docker build 过程中要运行的命令，即是创建 Docker 镜像（image）的步骤</li><li>CMD：设置容器的启动命令， Dockerﬁle 中只能有一条 CMD 命令，如果写了多条则最后一条生效，CMD不支持接收docker run的参数。</li><li>ENTRYPOINT：入口程序是容器启动时执行的程序， docker run 中最后的命令将作为参数传递给入口程序 ，ENTRYPOINY类似于 CMD 指令，但可以接收docker run的参数 。</li></ul> 
<p>以下是mysql官方镜像的Dockerﬁle示例：</p> 
<pre class="prettyprint"><code class="prism language-dockerfile has-numbering" onclick="mdcp.signin(event)" style="position: unset;">FROM oraclelinux:7-slim
ARG MYSQL_SERVER_PACKAGE=mysql-community-server-minimal-5.7.28
ARG MYSQL_SHELL_PACKAGE=mysql-shell-8.0.18
# Install server
RUN yum install -y https://repo.mysql.com/mysql-community-minimal-releaseel7.rpm \
    https://repo.mysql.com/mysql-community-release-el7.rpm \
    &amp;&amp; yum-config-manager --enable mysql57-server-minimal \
    &amp;&amp; yum install -y \
    $MYSQL_SERVER_PACKAGE \
    $MYSQL_SHELL_PACKAGE \
    libpwquality \
    &amp;&amp; yum clean all \
    &amp;&amp; mkdir /docker-entrypoint-initdb.d
VOLUME /var/lib/mysql
COPY docker-entrypoint.sh /entrypoint.sh
COPY healthcheck.sh /healthcheck.sh
ENTRYPOINT ["/entrypoint.sh"]
HEALTHCHECK CMD /healthcheck.sh
EXPOSE 3306 33060
CMD ["mysqld"]
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li></ul></pre> 
<h4><a id="Dockerle_2031"></a><mark>使用Dockerﬁle制作微服务镜像</mark></h4> 
<p>我们利用Dockerﬁle制作一个Eureka注册中心的镜像</p> 
<p>1）上传Eureka的微服务jar包到linux</p> 
<p>2）编写Dockerﬁle</p> 
<pre class="prettyprint"><code class="prism language-dockerfile has-numbering" onclick="mdcp.signin(event)" style="position: unset;">FROM openjdk:8-jdk-alpine
ARG JAR_FILE # 设置编译镜像时加入的参数
COPY ${JAR_FILE} app.jar # 将宿主机的文件复制到容器内，并重命名
EXPOSE 10086 # 暴露端口
ENTRYPOINT ["java","-jar","/app.jar"] # 设置容器的入口程序（可以在运行中接收参数）
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li></ul></pre> 
<p>3）构建镜像</p> 
<p>指定jar包，传到镜像里</p> 
<pre class="prettyprint"><code class="prism language-sh has-numbering" onclick="mdcp.signin(event)" style="position: unset;">docker build --build-arg JAR_FILE=tensquare_eureka_server-1.0-SNAPSHOT.jar -t eureka:v1 # 指定了JAR_FILE
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li></ul></pre> 
<p>4）查看镜像是否创建成功</p> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;"> docker images
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li></ul></pre> 
<p>5）创建容器</p> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">docker run -i --name=eureka -p 10086:10086 eureka:v1 
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li></ul></pre> 
<p>6）访问容器</p> 
<p>http://192.168.66.101:10086</p> 
<h2><a name="t62"></a><a id="3Harbor_2071"></a>环境准备(3)-<code>Harbor</code>镜像仓库安装及使用</h2> 
<h4><a id="Harbor_2073"></a>Harbor简介</h4> 
<p>Harbor（港口，港湾）是一个用于存储和分发Docker镜像的企业级Registry服务器。</p> 
<p>除了Harbor这个私有镜像仓库之外，还有Docker官方提供的Registry。相对Registry，Harbor具有很多优势：</p> 
<ul><li>\1. 提供分层传输机制，优化网络传输 Docker镜像是是分层的，而如果每次传输都使用全量文件(所以用FTP的方式并不适合)，显然不经济。必须提供识别分层传输的机制，以层的UUID为标识，确定传输的对象。</li><li>\2. 提供WEB界面，优化用户体验 只用镜像的名字来进行上传下载显然很不方便，需要有一个用户界面可以支持登陆、搜索功能，包括区分公有、私有镜像。</li><li>\3. 支持水平扩展集群 当有用户对镜像的上传下载操作集中在某服务器，需要对相应的访问压力作分解。</li><li>\4. 良好的安全机制 企业中的开发团队有很多不同的职位，对于不同的职位人员，分配不同的权限，具有更好的安全性。</li></ul> 
<h4><a id="Harbor_2084"></a>Harbor安装</h4> 
<p>Harbor需要安装在192.168.66.102上面</p> 
<p>1）先安装Docker并启动Docker（已完成）参考之前的安装过程</p> 
<p>2）先安装docker-compose</p> 
<pre class="prettyprint"><code class="prism language-sh has-numbering" onclick="mdcp.signin(event)" style="position: unset;">sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/dockercompose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li></ul></pre> 
<p>3）给docker-compose添加执行权限</p> 
<p>sudo chmod +x /usr/local/bin/docker-compose</p> 
<p>4）查看docker-compose是否安装成功</p> 
<p>docker-compose -version</p> 
<p>5）下载Harbor的压缩包 https://github.com/goharbor/harbor/releases</p> 
<p>6）上传压缩包到linux，并解压</p> 
<pre class="prettyprint"><code class="prism language-sh has-numbering" onclick="mdcp.signin(event)" style="position: unset;">tar -xzf harbor-oﬄine-installer-v1.9.2.tgz mkdir /opt/harbor
mv harbor/* /opt/harbor
cd /opt/harbor
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li></ul></pre> 
<p>7）修改Harbor的配置</p> 
<pre class="prettyprint"><code class="prism language-sh has-numbering" onclick="mdcp.signin(event)" style="position: unset;">vi harbor.yml

修改hostname和port 

hostname: 192.168.66.102
port: 85 
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li></ul></pre> 
<p>8）安装Harbor</p> 
<pre class="prettyprint"><code class="prism language-sh has-numbering" onclick="mdcp.signin(event)" style="position: unset;">./prepare

./install.sh 
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li></ul></pre> 
<p>9）启动Harbor</p> 
<pre class="prettyprint"><code class="prism language-sh has-numbering" onclick="mdcp.signin(event)" style="position: unset;">docker-compose up -d 启动

docker-compose stop 停止

docker-compose restart 重新启动
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li></ul></pre> 
<p>10）访问Harbor http://192.168.66.102:85</p> 
<p>默认账户密码：admin/Harbor12345</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/5982f8d099a3552da9022e0ca6e9a908.png" alt="img"></p> 
<h4><a id="Harbor_2150"></a>在Harbor创建用户和项目</h4> 
<p>1）创建项目</p> 
<p>Harbor的项目分为公开和私有的：</p> 
<p>公开项目：所有用户都可以访问，通常存放公共的镜像，默认有一个library公开项目。私有项目：只有授权用户才可以访问，通常存放项目本身的镜像。</p> 
<p>我们可以为微服务项目创建一个新的项目</p> 
<p>2）创建用户</p> 
<p>3）给私有项目分配用户进入tensquare项目-&gt;成员</p> 
<div class="table-box"><table><thead><tr><th><strong>角色</strong></th><th><strong>权限说明</strong></th></tr></thead><tbody><tr><td>访客</td><td>对于指定项目拥有只读权限</td></tr><tr><td>开发人员</td><td>对于指定项目拥有读写权限</td></tr><tr><td>维护人员</td><td>对于指定项目拥有读写权限，创建 Webhooks</td></tr><tr><td>项目管理员</td><td>除了读写权限，同时拥有用户管理/镜像扫描等管理权限</td></tr></tbody></table></div>
<p>4）以新用户登录Harbor，</p> 
<h4><a id="Harbor_2173"></a>把镜像上传到Harbor</h4> 
<p>1）给镜像打上标签</p> 
<p>docker tag eureka:v1 192.168.66.102:85/tensquare/eureka:v1</p> 
<p>2）推送镜像</p> 
<p>docker push 192.168.66.102:85/tensquare/eureka:v1</p> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">The push refers to repository [192.168.66.102:85/tensquare/eureka]
Get https://192.168.66.102:85/v2/: http: server gave HTTP response to HTTPS client
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li></ul></pre> 
<p>这时会出现以上报错，是因为Docker没有把Harbor加入信任列表中（他信任dockerHUB）</p> 
<p>3）把Harbor地址加入到Docker信任列表</p> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">vi /etc/docker/daemon.json

{ 
    "registry-mirrors": ["https://zydiol88.mirror.aliyuncs.com"],
    "insecure-registries": ["192.168.66.102:85"]
}
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li></ul></pre> 
<p>需要重启Docker</p> 
<p>4）再次执行推送命令，会提示权限不足</p> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">denied: requested access to the resource is denied
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li></ul></pre> 
<p>需要先登录Harbor，再推送镜像</p> 
<p>5）登录Harbor</p> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">docker login -u 用户名 -p 密码 192.168.66.102:85



WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li></ul></pre> 
<h4><a id="Harbor_2227"></a>从Harbor下载镜像</h4> 
<p>需求：在192.168.66.103服务器完成从Harbor下载镜像</p> 
<p>1）安装Docker，并启动Docker（已经完成）</p> 
<p>2）修改Docker配置</p> 
<p>vi /etc/docker/daemon.json</p> 
<pre class="prettyprint"><code class="prism language-json has-numbering" onclick="mdcp.signin(event)" style="position: unset;"><span class="token punctuation">{<!-- --></span> 
    <span class="token string">"registry-mirrors"</span><span class="token punctuation">:</span> <span class="token punctuation">[</span><span class="token string">"https://zydiol88.mirror.aliyuncs.com"</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
    <span class="token string">"insecure-registries"</span><span class="token punctuation">:</span> <span class="token punctuation">[</span><span class="token string">"192.168.66.102:85"</span><span class="token punctuation">]</span>
<span class="token punctuation">}</span>
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li></ul></pre> 
<p>重启docker</p> 
<p>3）先登录，再从Harbor下载镜像</p> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">docker login -u 用户名 -p 密码 192.168.66.102:85

docker pull 192.168.66.102:85/tensquare/eureka:v1
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li></ul></pre> 
<h2><a name="t63"></a><a id="1Gitlab_2256"></a>微服务持续集成(1)-项目代码上传到Gitlab</h2> 
<p>在IDEA操作即可，参考之前的步骤。包括后台微服务和前端web网站代码</p> 
<h2><a name="t64"></a><a id="2Gitlab_2260"></a>微服务持续集成(2)-从Gitlab拉取项目源码</h2> 
<p>在IDEA下</p> 
<p>1）创建Jenkinsﬁle文件</p> 
<pre class="prettyprint"><code class="prism language-json has-numbering" onclick="mdcp.signin(event)" style="position: unset;"><span class="token comment">//gitlab的凭证</span>
defgit_auth<span class="token operator">=</span><span class="token string">"68f2087f-a034-4d39-a9ff-1f776dd3dfa8"</span>
node<span class="token punctuation">{<!-- --></span>
    <span class="token function">stage</span><span class="token punctuation">(</span><span class="token string">'拉取代码'</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
        <span class="token function">checkout</span><span class="token punctuation">(</span><span class="token punctuation">[</span>
            $<span class="token keyword">class</span><span class="token punctuation">:</span> <span class="token string">'GitSCM'</span><span class="token punctuation">,</span>
            branches<span class="token punctuation">:</span> <span class="token punctuation">[</span>
                <span class="token punctuation">[</span> name<span class="token punctuation">:</span> <span class="token string">'*/${branch}'</span><span class="token punctuation">]</span>
            <span class="token punctuation">]</span><span class="token punctuation">,</span>
            doGenerateSubmoduleConfigurations<span class="token punctuation">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
            extensions<span class="token punctuation">:</span> <span class="token punctuation">[</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
            submoduleCfg<span class="token punctuation">:</span> <span class="token punctuation">[</span>  <span class="token punctuation">]</span><span class="token punctuation">,</span>
            userRemoteConfigs<span class="token punctuation">:</span> <span class="token punctuation">[</span>
                <span class="token punctuation">[</span>
                    credentialsId<span class="token punctuation">:</span> <span class="token string">"${git_auth}"</span><span class="token punctuation">,</span>
                    url<span class="token punctuation">:</span> <span class="token string">'git@192.168.66.100: itheima_group/tensquare_back.git'</span>
                <span class="token punctuation">]</span>
            <span class="token punctuation">]</span>
        <span class="token punctuation">]</span><span class="token punctuation">)</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li></ul></pre> 
<p>2）拉取Jenkinsﬁle文件</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/c19f978bccaf1a987e8ce662827509a2.png" alt="img"></p> 
<h2><a name="t65"></a><a id="3SonarQube_2296"></a>微服务持续集成(3)-提交到SonarQube代码审查</h2> 
<h5><a id="1_2298"></a>1）创建项目，并设置参数</h5> 
<p>创建tensquare_back项目，添加两个参数</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/c00f2c2c42507bf40808d47664357983.png" alt=""></p> 
<h5><a id="2sonarprojectproperties_2306"></a>2）sonar-project.properties</h5> 
<p><strong>每个项目</strong>的根目录下添加sonar-project.properties</p> 
<pre class="prettyprint"><code class="prism language-properties has-numbering" onclick="mdcp.signin(event)" style="position: unset;"># must be unique in a given SonarQube instance
sonar.projectKey=tensquare_zuul
# this is the name and version displayed in the SonarQube UI. Was mandatory
prior to SonarQube 6.1.
sonar.projectName=tensquare_zuul
sonar.projectVersion=1.0
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
# This property is optional if sonar.modules is set.
sonar.sources=.
sonar.exclusions=**/test/**,**/target/**
sonar.java.binaries=.
sonar.java.source=1.8
sonar.java.target=1.8
sonar.java.libraries=**/target/classes/**
# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li></ul></pre> 
<blockquote> 
 <p>注意：修改sonar.projectKey和sonar.projectName</p> 
</blockquote> 
<h5><a id="3Jenkinsle_2331"></a>3）修改Jenkinsﬁle构建脚本</h5> 
<pre class="prettyprint"><code class="prism language-json has-numbering" onclick="mdcp.signin(event)" style="position: unset;"><span class="token comment">//gitlab的凭证</span>
defgit_auth<span class="token operator">=</span><span class="token string">"68f2087f-a034-4d39-a9ff-1f776dd3dfa8"</span>
<span class="token comment">//构建版本的名称</span>
deftag<span class="token operator">=</span><span class="token string">"latest"</span>node<span class="token punctuation">{<!-- --></span>
    <span class="token function">stage</span><span class="token punctuation">(</span><span class="token string">'拉取代码'</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
        <span class="token function">checkout</span><span class="token punctuation">(</span><span class="token punctuation">[</span>
            $<span class="token keyword">class</span><span class="token punctuation">:</span> <span class="token string">'GitSCM'</span><span class="token punctuation">,</span>
            branches<span class="token punctuation">:</span> <span class="token punctuation">[</span>
                <span class="token punctuation">[</span> name<span class="token punctuation">:</span> <span class="token string">'*/${branch}'</span><span class="token punctuation">]</span>
            <span class="token punctuation">]</span><span class="token punctuation">,</span>
            doGenerateSubmoduleConfigurations<span class="token punctuation">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
            extensions<span class="token punctuation">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
            submoduleCfg<span class="token punctuation">:</span> <span class="token punctuation">[</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
            userRemoteConfigs<span class="token punctuation">:</span> <span class="token punctuation">[</span>
                <span class="token punctuation">[</span>
                    credentialsId<span class="token punctuation">:</span> <span class="token string">"${git_auth}"</span><span class="token punctuation">,</span>
                    url<span class="token punctuation">:</span> <span class="token string">'git@192.168.66.100: itheima_group/tensquare_back.git'</span>
                <span class="token punctuation">]</span>
            <span class="token punctuation">]</span>
        <span class="token punctuation">]</span><span class="token punctuation">)</span>
    <span class="token punctuation">}</span><span class="token function">stage</span><span class="token punctuation">(</span><span class="token string">'代码审查'</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
        defscannerHome<span class="token operator">=</span>tool <span class="token string">'sonarqube-scanner'</span><span class="token comment">//根据自己的Jenkinssonarqube-scanner环境修改</span>
        <span class="token function">withSonarQubeEnv</span><span class="token punctuation">(</span><span class="token string">'sonarqube6.7.4'</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span> <span class="token comment">//引入Jenkinssonarqube环境</span>
        	sh<span class="token string">""</span>"
            cd $<span class="token punctuation">{<!-- --></span>project_name<span class="token punctuation">}</span>  <span class="token comment">// 进入二级项目，如zuul</span>
            $<span class="token punctuation">{<!-- --></span>scannerHome<span class="token punctuation">}</span><span class="token operator">/</span>bin<span class="token operator">/</span>sonar<span class="token operator">-</span>scanner <span class="token comment">// 代码审查</span>
            <span class="token string">""</span>"
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li></ul></pre> 
<h2><a name="t66"></a><a id="4Dockerle_2370"></a>微服务持续集成(4)-使用Dockerﬁle编译、生成镜像</h2> 
<p>利用dockerﬁle-maven-plugin插件构建Docker镜像，他可以通过读取<code>Dockerfile</code>然后构建出docker镜像</p> 
<p>1）在每个微服务项目的pom.xml加入<code>dockerﬁle-maven-plugin</code>插件</p> 
<pre class="prettyprint"><code class="prism language-xml has-numbering" onclick="mdcp.signin(event)" style="position: unset;"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>plugin</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>groupId</span><span class="token punctuation">&gt;</span></span>com.spotify<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>groupId</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>artifactId</span><span class="token punctuation">&gt;</span></span>dockerfile-maven-plugin<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>artifactId</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>version</span><span class="token punctuation">&gt;</span></span>1.3.6<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>version</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>configuration</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>repository</span><span class="token punctuation">&gt;</span></span>${project.artifactId}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>repository</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>buildArgs</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>JAR_FILE</span><span class="token punctuation">&gt;</span></span>target/${project.build.finalName}.jar<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>JAR_FILE</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>buildArgs</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>configuration</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>plugin</span><span class="token punctuation">&gt;</span></span>
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li></ul></pre> 
<blockquote> 
 <p>这个xml可以和之前的编译镜像对比一下</p> 
 <p>docker build --build-arg JAR_FILE=tensquare_eureka_server-1.0-SNAPSHOT.jar -t eureka:v1</p> 
</blockquote> 
<p>2）在每个微服务项目根目录下建立Dockerﬁle文件</p> 
<pre class="prettyprint"><code class="prism language-dockerfile has-numbering" onclick="mdcp.signin(event)" style="position: unset;">#FROM java:8
FROM openjdk:8-jdk-alpine
ARG JAR_FILE
COPY ${JAR_FILE} app.jar
EXPOSE 10086
ENTRYPOINT ["java","-jar","/app.jar"]
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li></ul></pre> 
<p>注意：每个项目公开的端口不一样</p> 
<p>3）修改Jenkinsﬁle构建脚本</p> 
<pre class="prettyprint"><code class="prism language-json has-numbering" onclick="mdcp.signin(event)" style="position: unset;"><span class="token comment">//gitlab的凭证</span>
def git_auth <span class="token operator">=</span> <span class="token string">"68f2087f-a034-4d39-a9ff-1f776dd3dfa8"</span>
<span class="token comment">//构建版本的名称</span>
def tag <span class="token operator">=</span> <span class="token string">"latest"</span>
<span class="token comment">//Harbor私服地址</span>
def harbor_url <span class="token operator">=</span> <span class="token string">"192.168.66.102:85/tensquare/"</span>
node <span class="token punctuation">{<!-- --></span>
	<span class="token function">stage</span><span class="token punctuation">(</span><span class="token string">'拉取代码'</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
		<span class="token function">checkout</span><span class="token punctuation">(</span><span class="token punctuation">[</span>$<span class="token keyword">class</span><span class="token punctuation">:</span> <span class="token string">'GitSCM'</span><span class="token punctuation">,</span> 
                  branches<span class="token punctuation">:</span> <span class="token punctuation">[</span><span class="token punctuation">[</span>name<span class="token punctuation">:</span> <span class="token string">'*/${branch}'</span><span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
			doGenerateSubmoduleConfigurations<span class="token punctuation">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span> extensions<span class="token punctuation">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span> submoduleCfg<span class="token punctuation">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
			userRemoteConfigs<span class="token punctuation">:</span> <span class="token punctuation">[</span>
				<span class="token punctuation">[</span>credentialsId<span class="token punctuation">:</span> <span class="token string">"${git_auth}"</span><span class="token punctuation">,</span> url<span class="token punctuation">:</span>
					<span class="token string">'git@192.168.66.100:itheima_group/tensquare_back.git'</span>
				<span class="token punctuation">]</span>
			<span class="token punctuation">]</span>
		<span class="token punctuation">]</span><span class="token punctuation">)</span>
	<span class="token punctuation">}</span>
	<span class="token function">stage</span><span class="token punctuation">(</span><span class="token string">'代码审查'</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
		def scannerHome <span class="token operator">=</span> tool <span class="token string">'sonarqube-scanner'</span>
		<span class="token function">withSonarQubeEnv</span><span class="token punctuation">(</span><span class="token string">'sonarqube6.7.4'</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
			sh <span class="token string">""</span>"
			cd $ <span class="token punctuation">{<!-- --></span>project_name<span class="token punctuation">}</span>
			$ <span class="token punctuation">{<!-- --></span>scannerHome<span class="token punctuation">}</span><span class="token operator">/</span>bin<span class="token operator">/</span>sonar <span class="token operator">-</span> scanner
			<span class="token string">""</span>"
		<span class="token punctuation">}</span>
	<span class="token punctuation">}</span>
	<span class="token function">stage</span><span class="token punctuation">(</span><span class="token string">'编译，构建镜像'</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
		<span class="token comment">//定义镜像名称</span>
		def imageName <span class="token operator">=</span> <span class="token string">"${project_name}:${tag}"</span>
		<span class="token comment">//编译，安装公共工程</span>
		sh <span class="token string">"mvn -f tensquare_common clean install"</span>
		<span class="token comment">//编译，构建本地镜像</span>
		sh <span class="token string">"mvn -f ${project_name} clean package dockerfile:build"</span> <span class="token comment">// 多了个dockerfile:build，就是激活插件生成镜像</span>
	<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li></ul></pre> 
<p>注意：如果出现找不到父工程依赖，需要手动把父工程的依赖上传到仓库中</p> 
<h2><a name="t67"></a><a id="5Harbor_2454"></a>微服务持续集成(5)-上传到Harbor镜像仓库</h2> 
<p>2）使用凭证管理Harbor私服账户和密码</p> 
<p>先在凭证建立Harbor的凭证，在生成凭证脚本代码</p> 
<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210626035124.jpg" alt="img"> 
<p>生成一个id，用片段生成器语法中的wIth-creadentials</p> 
<p>1）修改Jenkinsﬁle构建脚本</p> 
<pre class="prettyprint"><code class="prism language-JSON has-numbering" onclick="mdcp.signin(event)" style="position: unset;">//gitlab的凭证
def git_auth = "68f2087f-a034-4d39-a9ff-1f776dd3dfa8"
//构建版本的名称
def tag = "latest"
//Harbor私服地址
def harbor_url = "192.168.66.102:85"
//Harbor的项目名称
def harbor_project_name = "tensquare"
//Harbor的凭证
def harbor_auth = "ef499f29-f138-44dd-975e-ff1ca1d8c933"
node {
   stage('拉取代码') {
   	checkout([$class: 'GitSCM',
                 branches: [[name: '*/${branch}']],
                 doGenerateSubmoduleConfigurations: false,
                 extensions: [], submoduleCfg: [],
                 userRemoteConfigs: [
                     [credentialsId: "${git_auth}", 
                      url:'git@192.168.66.100:itheima_group/tensquare_back.git'
   			]
   		]
   	])
   }
   stage('代码审查') {
   	def scannerHome = tool 'sonarqube-scanner'
   	withSonarQubeEnv('sonarqube6.7.4') {
   		sh """
   		cd $ {project_name}
   		$ {scannerHome}/bin/sonar-scanner
   		"""
   	}
   }
   stage('编译，构建镜像') {
   	//定义镜像名称
   	def imageName = "${project_name}:${tag}"
   	//编译，安装公共工程
   	sh "mvn -f tensquare_common clean install"
   	//编译，构建本地镜像
   	sh "mvn -f ${project_name} clean package dockerfile:build"
   	//给镜像打标签
   	sh "docker tag ${imageName}  ${harbor_url}/${harbor_project_name}/${imageName}"
   	//登录Harbor，并上传镜像
   	withCredentials([usernamePassword(
               credentialsId: "${harbor_auth}",
               passwordVariable: 'password',  // 就是这样的，不用替换，在jk中配置的
               usernameVariable: 'username')])
   	{
   		//登录
   		sh "docker login -u ${username} -p ${password} ${harbor_url}"
   		//上传镜像
   		sh "docker push ${harbor_url}/${harbor_project_name}/${imageName}"
   	}
   	//删除本地镜像
   	sh "docker rmi -f ${imageName}"
   	sh "docker rmi -f ${harbor_url}/${harbor_project_name}/${imageName}"
   }
}
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li><li style="color: rgb(153, 153, 153);">40</li><li style="color: rgb(153, 153, 153);">41</li><li style="color: rgb(153, 153, 153);">42</li><li style="color: rgb(153, 153, 153);">43</li><li style="color: rgb(153, 153, 153);">44</li><li style="color: rgb(153, 153, 153);">45</li><li style="color: rgb(153, 153, 153);">46</li><li style="color: rgb(153, 153, 153);">47</li><li style="color: rgb(153, 153, 153);">48</li><li style="color: rgb(153, 153, 153);">49</li><li style="color: rgb(153, 153, 153);">50</li><li style="color: rgb(153, 153, 153);">51</li><li style="color: rgb(153, 153, 153);">52</li><li style="color: rgb(153, 153, 153);">53</li><li style="color: rgb(153, 153, 153);">54</li><li style="color: rgb(153, 153, 153);">55</li><li style="color: rgb(153, 153, 153);">56</li><li style="color: rgb(153, 153, 153);">57</li></ul></pre> 
<h2><a name="t68"></a><a id="6_2528"></a>微服务持续集成(6)-拉取镜像和发布应用</h2> 
<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210624005738.jpg" alt="img"> 
<p>注意：192.168.66.103服务已经安装Docker并启动</p> 
<p>JK安装publish over ssh插件，可以实现远程发送Shell命令，使得部署服务器执行一些操作</p> 
<h4><a id="_2538"></a><mark>配置远程部署服务器</mark></h4> 
<p>上面所述的远程调用（jk调用部署服务器）是需要公钥私钥的</p> 
<p>1）拷贝公钥到远程服务器（部署服务器）</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-AatEj4hL-1624726844530)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image073.gif)]ssh-copy-id 192.168.66.103</p> 
<p>2）系统配置-&gt;添加远程服务器</p> 
<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210626035340.jpg" alt="img"> 
<p>修改Jenkinsﬁle构建脚本生成远程调用模板代码</p> 
<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210626035346.jpg" alt="img"> 
<p>选择的片段生成器是sshPublisher</p> 
<p>添加一个port参数:port 10086</p> 
<pre class="prettyprint"><code class="prism language-JSON has-numbering" onclick="mdcp.signin(event)" style="position: unset;">//gitlab的凭证
defgit_auth="68f2087f-a034-4d39-a9ff-1f776dd3dfa8"//构建版本的名称
deftag="latest"//Harbor私服地址
defharbor_url="192.168.66.102:85"//Harbor的项目名称
defharbor_project_name="tensquare"//Harbor的凭证
defharbor_auth="ef499f29-f138-44dd-975e-ff1ca1d8c933"
node{
    stage('拉取代码'){
        checkout([
            $class: 'GitSCM',
            branches: [ [ name: '*/${ branch}' ] ],
            doGenerateSubmoduleConfigurations: false,
            extensions: [ ],
            submoduleCfg: [],
            userRemoteConfigs: [
                [
                    credentialsId: "${git_auth}",
                    url: 'git@192.168.66.100: itheima_group/tensquare_back.git'
                ]
            ]
        ])
    }stage('代码审查'){
        defscannerHome=tool'sonarqube-scanner'withSonarQubeEnv('sonarqube6.7.4'){
            sh"""
            cd ${project_name}
            ${scannerHome}/bin/sonar-scanner
            """
        }
    }stage('编译，构建镜像，部署服务'){
        //定义镜像名称
        defimageName="${project_name}:${tag}"//编译并安装公共工程
        sh"mvn -f tensquare_common clean install"//编译，构建本地镜像
        sh"mvn -f ${project_name} clean package dockerfile:build"//给镜像打标签
        sh"docker tag ${imageName}${harbor_url}/${harbor_project_name}/${imageName}"//登录Harbor，并上传镜像
        withCredentials([
            usernamePassword(credentialsId: "${harbor_auth}",
            passwordVariable: 'password',
            usernameVariable: 'username')
        ]){
            //登录
            sh"docker login -u ${username} -p ${password} ${harbor_url}"//上传镜像
            sh"docker push ${harbor_url}/${harbor_project_name}/${imageName}"
        }
//删除本地镜像
sh"docker rmi -f ${imageName}"
sh"docker rmi -f ${harbor_url}/${harbor_project_name}/${imageName}"
//=====以下为远程调用进行项目部署========
sshPublisher(publishers: [
            sshPublisherDesc(configName: 'master_server',
            transfers: [
                sshTransfer(cleanRemote: false,
                excludes: '',
             // 触发的命令，deploy.sh
                execCommand: "/opt/jenkins_shell/deploy.sh $harbor_url $harbor_project_name $project_name $tag $port",
                execTimeout: 120000,
                flatten: false,
                makeEmptyDirs: false,
                noDefaultExcludes: false,
                patternSeparator: '[ , ]+',
                remoteDirectory: '',
                remoteDirectorySDF: false,
                removePrefix: '',
                sourceFiles: '')
            ],
            usePromotionTimestamp: false,
            useWorkspaceInPromotion: false,
            verbose: false)
        ])
    }
}
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li><li style="color: rgb(153, 153, 153);">40</li><li style="color: rgb(153, 153, 153);">41</li><li style="color: rgb(153, 153, 153);">42</li><li style="color: rgb(153, 153, 153);">43</li><li style="color: rgb(153, 153, 153);">44</li><li style="color: rgb(153, 153, 153);">45</li><li style="color: rgb(153, 153, 153);">46</li><li style="color: rgb(153, 153, 153);">47</li><li style="color: rgb(153, 153, 153);">48</li><li style="color: rgb(153, 153, 153);">49</li><li style="color: rgb(153, 153, 153);">50</li><li style="color: rgb(153, 153, 153);">51</li><li style="color: rgb(153, 153, 153);">52</li><li style="color: rgb(153, 153, 153);">53</li><li style="color: rgb(153, 153, 153);">54</li><li style="color: rgb(153, 153, 153);">55</li><li style="color: rgb(153, 153, 153);">56</li><li style="color: rgb(153, 153, 153);">57</li><li style="color: rgb(153, 153, 153);">58</li><li style="color: rgb(153, 153, 153);">59</li><li style="color: rgb(153, 153, 153);">60</li><li style="color: rgb(153, 153, 153);">61</li><li style="color: rgb(153, 153, 153);">62</li><li style="color: rgb(153, 153, 153);">63</li><li style="color: rgb(153, 153, 153);">64</li><li style="color: rgb(153, 153, 153);">65</li><li style="color: rgb(153, 153, 153);">66</li><li style="color: rgb(153, 153, 153);">67</li><li style="color: rgb(153, 153, 153);">68</li><li style="color: rgb(153, 153, 153);">69</li><li style="color: rgb(153, 153, 153);">70</li></ul></pre> 
<p>编写deploy.sh部署脚本</p> 
<pre class="prettyprint"><code class="prism language-sh has-numbering" onclick="mdcp.signin(event)" style="position: unset;">#!/bin/sh
#接收外部参数
harbor_url=$1
harbor_project_name=$2
project_name=$3
tag=$4
port=$5

imageName=$harbor_url/$harbor_project_name/$project_name:$tag
echo "$imageName"
#查询容器是否存在，存在则删除
containerId=`docker ps -a | grep -w ${project_name}:${tag} | awk '{print $1}'`
if [ "$containerId" != "" ] ; then
    #停掉容器
    docker stop $containerId
    #删除容器
    docker rm $containerId
    echo "成功删除容器"
fi
#查询镜像是否存在，存在则删除
imageId=`docker images | grep -w $project_name | awk '{print $3}'`
if [ "$imageId" != "" ] ; then
    #删除镜像
    docker rmi -f $imageId
    echo "成功删除镜像"
fi
# 登录Harbor私服
docker login -u itcast -p Itcast123 $harbor_url
# 下载镜像
docker pull $imageName
# 启动容器
docker run -di -p $port:$port $imageName
echo "容器启动成功"
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li></ul></pre> 
<p>上传deploy.sh文件到/opt/jenkins_shell目录下，且文件至少有执行权限！</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-5nDPzMrS-1624726844533)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image073.gif)]chmod +x deploy.sh 添加执行权限</p> 
<p><strong>导入数据，测试微服务</strong>：两个sql</p> 
<p>要把spring里的注册中心等ip信息写成部署服务器所在的地址</p> 
<h2><a name="t69"></a><a id="7web_2689"></a>微服务持续集成(7)-部署前端静态web网站</h2> 
<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210626232520.png"> 
<h3><a name="t70"></a><a id="Nginx_2695"></a>安装Nginx服务器</h3> 
<pre class="prettyprint"><code class="prism language-sh has-numbering" onclick="mdcp.signin(event)" style="position: unset;"># 103上
yum install epel-release 

yum -y install nginx 安装

修改nginx的端口，默认80，改为9090：

vi /etc/nginx/nginx.conf

还需要关闭selinux，将SELINUX=disabled setenforce 0 先临时关闭

vi /etc/selinux/conﬁg 编辑文件，永久关闭 SELINUX=disabled
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li></ul></pre> 
<p>启动Nginx</p> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">systemctl enable nginx 设置开机启动
systemctl start nginx 启动 
systemctl stop nginx 停止 
systemctl restart nginx 重启
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li></ul></pre> 
<p>访问：http://192.168.66.103:9090/</p> 
<h3><a name="t71"></a><a id="JenkinsNodeJS_2725"></a>Jenkins安装NodeJS插件</h3> 
<p>Jenkins配置Nginx服务器</p> 
<p>Manage Jenkins-&gt;Global Tool Conﬁguration</p> 
<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210626235849.jpg" alt="img"> 
<h3><a name="t72"></a><a id="_2739"></a>创建前端流水线项目</h3> 
<p>还是创建个带branch参数的项目</p> 
<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210626235902.jpg" alt="img"> 
<p>建立Jenkinsﬁle构建脚本</p> 
<pre class="prettyprint"><code class="prism language-json has-numbering" onclick="mdcp.signin(event)" style="position: unset;"><span class="token comment">//gitlab的凭证</span>
defgit_auth<span class="token operator">=</span><span class="token string">"68f2087f-a034-4d39-a9ff-1f776dd3dfa8"</span>
node<span class="token punctuation">{<!-- --></span>
    <span class="token function">stage</span><span class="token punctuation">(</span><span class="token string">'拉取代码'</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
        <span class="token function">checkout</span><span class="token punctuation">(</span><span class="token punctuation">[</span>
            $<span class="token keyword">class</span><span class="token punctuation">:</span> <span class="token string">'GitSCM'</span><span class="token punctuation">,</span>
            branches<span class="token punctuation">:</span> <span class="token punctuation">[</span>  <span class="token punctuation">[</span> name<span class="token punctuation">:</span> <span class="token string">'*/${branch}'</span> <span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
            doGenerateSubmoduleConfigurations<span class="token punctuation">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
            extensions<span class="token punctuation">:</span> <span class="token punctuation">[</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
            submoduleCfg<span class="token punctuation">:</span> <span class="token punctuation">[</span> <span class="token punctuation">]</span><span class="token punctuation">,</span>
            userRemoteConfigs<span class="token punctuation">:</span> <span class="token punctuation">[</span>
                <span class="token punctuation">[</span>
                    credentialsId<span class="token punctuation">:</span> <span class="token string">"${git_auth}"</span><span class="token punctuation">,</span>
                    url<span class="token punctuation">:</span> <span class="token string">'git@192.168.66.100: itheima_group/tensquare_front.git'</span>
                <span class="token punctuation">]</span>
            <span class="token punctuation">]</span>
        <span class="token punctuation">]</span><span class="token punctuation">)</span>
    <span class="token punctuation">}</span><span class="token function">stage</span><span class="token punctuation">(</span><span class="token string">'打包，部署网站'</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
        <span class="token comment">//使用NodeJS的npm进行打包</span>
        <span class="token function">nodejs</span><span class="token punctuation">(</span><span class="token string">'nodejs12'</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
            sh<span class="token string">''</span>'npm install 
            	npm run build
            <span class="token string">''</span>'
        <span class="token punctuation">}</span>
        <span class="token comment">//=====以下为远程调用进行项目部署========</span>
        <span class="token function">sshPublisher</span><span class="token punctuation">(</span>publishers<span class="token punctuation">:</span> <span class="token punctuation">[</span>
            <span class="token function">sshPublisherDesc</span><span class="token punctuation">(</span>
        	configName<span class="token punctuation">:</span> <span class="token string">'master_server'</span><span class="token punctuation">,</span>
            transfers<span class="token punctuation">:</span> <span class="token punctuation">[</span>
                <span class="token function">sshTransfer</span><span class="token punctuation">(</span>cleanRemote<span class="token punctuation">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
                excludes<span class="token punctuation">:</span> <span class="token string">''</span><span class="token punctuation">,</span>
                execCommand<span class="token punctuation">:</span> <span class="token string">''</span><span class="token punctuation">,</span>
                execTimeout<span class="token punctuation">:</span> <span class="token number">120000</span><span class="token punctuation">,</span>
                flatten<span class="token punctuation">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
                makeEmptyDirs<span class="token punctuation">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
                noDefaultExcludes<span class="token punctuation">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
                patternSeparator<span class="token punctuation">:</span> <span class="token string">'[,]+'</span><span class="token punctuation">,</span>
                remoteDirectory<span class="token punctuation">:</span> <span class="token string">'/usr/share/nginx/html'</span><span class="token punctuation">,</span>
                remoteDirectorySDF<span class="token punctuation">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
                removePrefix<span class="token punctuation">:</span> <span class="token string">'dist'</span><span class="token punctuation">,</span>
                sourceFiles<span class="token punctuation">:</span> <span class="token string">'dist/**'</span><span class="token punctuation">)</span>
            <span class="token punctuation">]</span><span class="token punctuation">,</span>
            usePromotionTimestamp<span class="token punctuation">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
            useWorkspaceInPromotion<span class="token punctuation">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
            verbose<span class="token punctuation">:</span> <span class="token boolean">false</span><span class="token punctuation">)</span>
        <span class="token punctuation">]</span><span class="token punctuation">)</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li><li style="color: rgb(153, 153, 153);">40</li><li style="color: rgb(153, 153, 153);">41</li><li style="color: rgb(153, 153, 153);">42</li><li style="color: rgb(153, 153, 153);">43</li><li style="color: rgb(153, 153, 153);">44</li><li style="color: rgb(153, 153, 153);">45</li><li style="color: rgb(153, 153, 153);">46</li><li style="color: rgb(153, 153, 153);">47</li><li style="color: rgb(153, 153, 153);">48</li></ul></pre> 
<p>完成后，访问：http://192.168.66.103:9090 进行测试。</p> 
<h1><a name="t73"></a><a id="5JenkinsDockerSpringCloud_2806"></a>5、Jenkins+Docker+SpringCloud微服务持续集成(下)</h1> 
<h2><a name="t74"></a><a id="JKDockerCloud_2808"></a>JK+Docker+Cloud部署方案优化</h2> 
<p>上面部署方案存在的问题：</p> 
<p>1）一次只能选择一个微服务部署</p> 
<p>2）只有一台生产者部署服务器</p> 
<p>3）每个微服务只有一个实例，容错率低</p> 
<p>优化方案：</p> 
<p>1）在一个Jenkins工程中可以选择多个微服务同时发布</p> 
<p>2）在一个Jenkins工程中可以选择多台生产服务器同时部署</p> 
<p>3）每个微服务都是以<strong>集群高可用</strong>形式部署</p> 
<h2><a name="t75"></a><a id="JenkinsDockerSpringCloud_2832"></a>Jenkins+Docker+SpringCloud集群部署流程说明</h2> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/86bc26b4da1199c3ba5637bc1193806f.png" alt="img"></p> 
<ul><li>生成多个镜像</li><li>对多个部署服务器发起远程调用</li></ul> 
<p><strong>修改所有微服务配置</strong></p> 
<h5><a id="_2841"></a>注册中心配置</h5> 
<p>缩进自己调整下</p> 
<pre class="prettyprint"><code class="prism language-yaml has-numbering" onclick="mdcp.signin(event)" style="position: unset;"><span class="token comment"># 集群版</span>
<span class="token key atrule">spring</span><span class="token punctuation">:</span>
	<span class="token key atrule">application</span><span class="token punctuation">:</span>
		<span class="token key atrule">name</span><span class="token punctuation">:</span> EUREKA<span class="token punctuation">-</span>HA
<span class="token punctuation">---</span>
<span class="token key atrule">server</span><span class="token punctuation">:</span>
	<span class="token key atrule">port</span><span class="token punctuation">:</span> <span class="token number">10086</span>

<span class="token key atrule">spring</span><span class="token punctuation">:</span>
<span class="token comment"># 指定profile=eureka-server1</span>
	<span class="token key atrule">profiles</span><span class="token punctuation">:</span> eureka<span class="token punctuation">-</span>server1

<span class="token key atrule">eureka</span><span class="token punctuation">:</span>
    <span class="token key atrule">instance</span><span class="token punctuation">:</span>
        <span class="token comment"># 指定当profile=eureka-server1时，主机名是eureka-server1</span>
        <span class="token key atrule">hostname</span><span class="token punctuation">:</span> 192.168.66.103
    <span class="token key atrule">client</span><span class="token punctuation">:</span>
        <span class="token key atrule">service-url</span><span class="token punctuation">:</span>
        	<span class="token comment"># 将自己注册到eureka-server1、eureka-server2这个Eureka上面去</span>
        	<span class="token key atrule">defaultZone</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//192.168.66.103<span class="token punctuation">:</span>10086/eureka/<span class="token punctuation">,</span>http<span class="token punctuation">:</span>//192.168.66.104<span class="token punctuation">:</span>10086/eureka/
<span class="token punctuation">---</span>
<span class="token key atrule">server</span><span class="token punctuation">:</span>
<span class="token key atrule">port</span><span class="token punctuation">:</span> <span class="token number">10086</span>
<span class="token key atrule">spring</span><span class="token punctuation">:</span>
<span class="token key atrule">profiles</span><span class="token punctuation">:</span> eureka<span class="token punctuation">-</span>server2
<span class="token key atrule">eureka</span><span class="token punctuation">:</span>
<span class="token key atrule">instance</span><span class="token punctuation">:</span>
<span class="token key atrule">hostname</span><span class="token punctuation">:</span> 192.168.66.104
<span class="token key atrule">client</span><span class="token punctuation">:</span>
<span class="token key atrule">service-url</span><span class="token punctuation">:</span>
<span class="token key atrule">defaultZone</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//192.168.66.103<span class="token punctuation">:</span>10086/eureka/<span class="token punctuation">,</span>http<span class="token punctuation">:</span>//192.168.66.104<span class="token punctuation">:</span>10086/eureka/
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li></ul></pre> 
<p>在启动微服务的时候，加入参数: <code>spring.proﬁles.active</code>来读取对应的配置</p> 
<h5><a id="_2883"></a>其他微服务配置</h5> 
<p>除了Eureka注册中心以外，其他微服务配置都需要加入所有Eureka服务</p> 
<pre class="prettyprint"><code class="prism language-yaml has-numbering" onclick="mdcp.signin(event)" style="position: unset;"><span class="token comment"># Eureka配置</span>
<span class="token key atrule">eureka</span><span class="token punctuation">:</span>
    <span class="token key atrule">client</span><span class="token punctuation">:</span>
    	<span class="token key atrule">service-url</span><span class="token punctuation">:</span>
    		<span class="token key atrule">defaultZone</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//192.168.66.103<span class="token punctuation">:</span>10086/eureka<span class="token punctuation">,</span>http<span class="token punctuation">:</span>//192.168.66.104<span class="token punctuation">:</span>10086/eureka <span class="token comment"># Eureka访问地址</span>
    <span class="token key atrule">instance</span><span class="token punctuation">:</span>
    	<span class="token key atrule">prefer-ip-address</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li></ul></pre> 
<p>把代码提交到Gitlab中</p> 
<h5><a id="Jenkins_2901"></a>设计Jenkins集群项目的构建参数</h5> 
<p>1）安装<code>Extended Choice Parameter</code>插件,支持多选框</p> 
<p>2）创建流水线项目</p> 
<p>tensquera_back_cluster</p> 
<p>3）添加参数</p> 
<p>字符串参数：分支名称branch</p> 
<p>多选框：项目名称</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20cdacc2638253457aa6c753ac836975.png" alt="img"></p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/f77ec775d8e449b96c4925f2b6c45112.png" alt="img"></p> 
<pre class="prettyprint"><code class="has-numbering" onclick="mdcp.signin(event)" style="position: unset;">tensquare_eureka_server@10086,
tensquare_zuul@10020,
tensquare_admin_service@9001,
tensquare_gathering@9002
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li></ul></pre> 
<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210627004239.png"> 
<p>最后效果：</p> 
<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210627004257.png"> 
<h2><a name="t76"></a><a id="_2938"></a>完成微服务构建镜像，上传私服</h2> 
<pre class="prettyprint"><code class="prism language-Json has-numbering" onclick="mdcp.signin(event)" style="position: unset;">//gitlab的凭证
defgit_auth="68f2087f-a034-4d39-a9ff-1f776dd3dfa8"
//构建版本的名称
deftag="latest"
//Harbor私服地址
defharbor_url="192.168.66.102:85"
//Harbor的项目名称
defharbor_project_name="tensquare"
//Harbor的凭证
defharbor_auth="ef499f29-f138-44dd-975e-ff1ca1d8c933"
node{
    //把选择的项目信息转为数组
    defselectedProjects="${project_name}".split(',')
stage('拉取代码'){
    checkout([
        $class: 'GitSCM',
        branches: [[name: '*/${branch}'] ],
        doGenerateSubmoduleConfigurations: false,
        extensions: [],
        submoduleCfg: [],
        userRemoteConfigs: [
        [
            credentialsId: '${git_auth}',
            url: 'git@192.168.66.100: itheima_group/tensquare_back_cluster.git'
        ]
    ]
    ])
}stage('代码审查'){
    defscannerHome=tool 'sonarqube-scanner'
    withSonarQubeEnv('sonarqube6.7.4'){
        for(inti=0;i&lt;selectedProjects.size();i++){
            //取出每个项目的名称和端口
            defcurrentProject=selectedProjects[i ];
            //项目名称
            defcurrentProjectName=currentProject.split('@')[0]
            //项目启动端口
            defcurrentProjectPort=currentProject.split('@')[1]
            sh"""
            cd ${currentProjectName}
            ${scannerHome}/bin/sonar-scanner
            """
            echo "${currentProjectName}完成代码审查"
    	}
    }
}
stage('编译，构建镜像，部署服务'){
    //编译并安装公共工程
    sh"mvn -f tensquare_common clean install"
    for(inti=0;i&lt;selectedProjects.size();i++){
        //取出每个项目的名称和端口
        defcurrentProject=selectedProjects[i];
        //项目名称
        defcurrentProjectName=currentProject.split('@')[0]
        //项目启动端口
        defcurrentProjectPort=currentProject.split('@')[1]
        //定义镜像名称
        defimageName="${currentProjectName}:${tag}"
        //编译，构建本地镜像
        sh"mvn -f ${currentProjectName} clean packagedockerfile:build"
        //给镜像打标签
        sh"docker tag ${imageName}${harbor_url}/${harbor_project_name}/${imageName}"
        //登录Harbor，并上传镜像
        withCredentials([
            usernamePassword(credentialsId: "${harbor_auth}",
                             passwordVariable: 'password',
                             usernameVariable: 'username')
        ]){
    //登录
    sh"docker login -u ${username} -p ${password}${harbor_url}"
    //上传镜像
    sh"docker push ${harbor_url}/${harbor_project_name}/${imageName}"
}
//删除本地镜像
sh"docker rmi -f ${imageName}"
sh"docker rmi -f ${harbor_url}/${harbor_project_name}/${imageName}"
//=====以下为远程调用进行项目部署========//
sshPublisher(publishers: [
             sshPublisherDesc(configName: 'master_server',
             transfers: [
             sshTransfer(cleanRemote: false,
             excludes: '',
             execCommand: "/opt/jenkins_shell/deployCluster.sh $harbor_url $harbor_project_name $currentProjectName $tag $currentProjectPort",
             execTimeout: 120000,
             flatten: false,
             makeEmptyDirs: false,
             noDefaultExcludes: false,
             patternSeparator: '[,]+',
             remoteDirectory: '',
             remoteDirectorySDF: false,
             removePrefix: '',
             sourceFiles: '')
],
usePromotionTimestamp: false,
useWorkspaceInPromotion: false,
verbose: false)
])echo"${currentProjectName}完成编译，构建镜像"
}
}
}
<div class="hljs-button signin" data-title="登录后复制" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.4334&quot;}"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li><li style="color: rgb(153, 153, 153);">40</li><li style="color: rgb(153, 153, 153);">41</li><li style="color: rgb(153, 153, 153);">42</li><li style="color: rgb(153, 153, 153);">43</li><li style="color: rgb(153, 153, 153);">44</li><li style="color: rgb(153, 153, 153);">45</li><li style="color: rgb(153, 153, 153);">46</li><li style="color: rgb(153, 153, 153);">47</li><li style="color: rgb(153, 153, 153);">48</li><li style="color: rgb(153, 153, 153);">49</li><li style="color: rgb(153, 153, 153);">50</li><li style="color: rgb(153, 153, 153);">51</li><li style="color: rgb(153, 153, 153);">52</li><li style="color: rgb(153, 153, 153);">53</li><li style="color: rgb(153, 153, 153);">54</li><li style="color: rgb(153, 153, 153);">55</li><li style="color: rgb(153, 153, 153);">56</li><li style="color: rgb(153, 153, 153);">57</li><li style="color: rgb(153, 153, 153);">58</li><li style="color: rgb(153, 153, 153);">59</li><li style="color: rgb(153, 153, 153);">60</li><li style="color: rgb(153, 153, 153);">61</li><li style="color: rgb(153, 153, 153);">62</li><li style="color: rgb(153, 153, 153);">63</li><li style="color: rgb(153, 153, 153);">64</li><li style="color: rgb(153, 153, 153);">65</li><li style="color: rgb(153, 153, 153);">66</li><li style="color: rgb(153, 153, 153);">67</li><li style="color: rgb(153, 153, 153);">68</li><li style="color: rgb(153, 153, 153);">69</li><li style="color: rgb(153, 153, 153);">70</li><li style="color: rgb(153, 153, 153);">71</li><li style="color: rgb(153, 153, 153);">72</li><li style="color: rgb(153, 153, 153);">73</li><li style="color: rgb(153, 153, 153);">74</li><li style="color: rgb(153, 153, 153);">75</li><li style="color: rgb(153, 153, 153);">76</li><li style="color: rgb(153, 153, 153);">77</li><li style="color: rgb(153, 153, 153);">78</li><li style="color: rgb(153, 153, 153);">79</li><li style="color: rgb(153, 153, 153);">80</li><li style="color: rgb(153, 153, 153);">81</li><li style="color: rgb(153, 153, 153);">82</li><li style="color: rgb(153, 153, 153);">83</li><li style="color: rgb(153, 153, 153);">84</li><li style="color: rgb(153, 153, 153);">85</li><li style="color: rgb(153, 153, 153);">86</li><li style="color: rgb(153, 153, 153);">87</li><li style="color: rgb(153, 153, 153);">88</li><li style="color: rgb(153, 153, 153);">89</li><li style="color: rgb(153, 153, 153);">90</li><li style="color: rgb(153, 153, 153);">91</li><li style="color: rgb(153, 153, 153);">92</li><li style="color: rgb(153, 153, 153);">93</li><li style="color: rgb(153, 153, 153);">94</li><li style="color: rgb(153, 153, 153);">95</li><li style="color: rgb(153, 153, 153);">96</li><li style="color: rgb(153, 153, 153);">97</li><li style="color: rgb(153, 153, 153);">98</li><li style="color: rgb(153, 153, 153);">99</li></ul></pre> 
<h2><a name="t77"></a><a id="_3046"></a>完成微服务多服务器远程发布</h2> 
<p>1）配置远程部署服务器</p> 
<p>拷贝公钥到远程服务器</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-RCoZQpty-1624726844535)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image073.gif)]ssh-copy-id 192.168.66.104</p> 
<p>系统配置-&gt;添加远程服务器</p> 
<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210627005615.jpg" alt="img"> 
<p>2）修改Docker配置信任Harbor私服地址</p> 
<p>重启Docker</p> 
<p>3）添加参数</p> 
<p>多选框：部署服务器</p> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/ccab13173227265552bf0fcfd763a8ce.png" alt="img"></p> 
<p>最终效果：</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-wVRAztE4-1624726844536)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image380.jpg)]</p> 
<p>4）修改Jenkinsﬁle构建脚本</p> 
<p>5）编写deployCluster.sh部署脚本</p> 
<p>6）集群效果</p> 
<h2><a name="t78"></a><a id="NginxZuul_3102"></a>Nginx+Zuul集群实现高可用网关</h2> 
<p>1）安装Nginx（已完成）</p> 
<p>2）修改Nginx配置</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-PLPGk8wR-1624726844537)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image073.gif)]vi /etc/nginx/nginx.conf</p> 
<p>内容如下：</p> 
<p>3）重启Nginx： systemctl restart nginx</p> 
<p>4）修改前端Nginx的访问地址</p> 
<h1><a name="t79"></a><a id="6K8SJenkins_3124"></a>6、基于<code>K8S</code>构建Jenkins持续集成平台(上)</h1> 
<h2><a name="t80"></a><a id="JenkinsMasterSlave_3126"></a>Jenkins的Master-Slave分布式构建</h2> 
<h3><a name="t81"></a><a id="MasterSlave_3128"></a>什么是Master-Slave分布式构建</h3> 
<p><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/d8bdfd152c7d1911141c1a1217ecdbea.png" alt="img"></p> 
<p>Jenkins的Master-Slave分布式构建，就是通过将构建过程分配到从属Slave节点上，从而减轻Master节点的压力，而且可以同时构建多个，有点类似负载均衡的概念。</p> 
<h3><a name="t82"></a><a id="MasterSlave_3138"></a>如何实现Master-Slave分布式构建</h3> 
<p>1）开启代理程序的TCP端口</p> 
<p>Manage Jenkins -&gt; Conﬁgure Global Security</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-WlzMsRVH-1624726844539)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image395.jpg)]</p> 
<p>2）新建节点</p> 
<p>Manage Jenkins—Manage Nodes—新建节点</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-d9nqUjFA-1624726844539)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image396.jpg)]</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-VOL3tnzB-1624726844540)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image398.jpg)]</p> 
<p>有两种在Slave节点连接Master节点的方法</p> 
<div class="table-box"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td></td><td>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-Dc3vSkMi-1624726844541)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image401.jpg)]</td></tr></tbody></table></div>
<p>我们选择第二种：</p> 
<p>2）安装和配置节点</p> 
<p>下载agent.jar，并上传到Slave节点，然后执行页面提示的命令：</p> 
<p>刷新页面</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-UAGGOPUd-1624726844541)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image404.jpg)]</p> 
<p>3）测试节点是否可用</p> 
<p>自由风格和Maven风格的项目：</p> 
<div class="table-box"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td></td><td>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-GJiowKar-1624726844542)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image405.jpg)]</td></tr></tbody></table></div>
<p>流水线风格的项目：</p> 
<h2><a name="t83"></a><a id="KubernetesMasterSlave_3202"></a>Kubernetes实现Master-Slave分布式构建方案</h2> 
<h3><a name="t84"></a><a id="JenkinsMasterSlave_3204"></a>传统Jenkins的Master-Slave方案的缺陷</h3> 
<p>Master节点发生单点故障时，整个流程都不可用了</p> 
<p>每个 Slave节点的配置环境不一样，来完成不同语言的编译打包等操作，但是这些差异化的配置导致管理起来非常不方便，维护起来也是比较费劲</p> 
<p>资源分配不均衡，有的 Slave节点要运行的job出现排队等待，而有的Slave节点处于空闲状态</p> 
<p>资源浪费，每台 Slave节点可能是实体机或者VM，当Slave节点处于空闲状态时，也不会完全释放掉资源</p> 
<p>以上种种问题，我们可以引入Kubernates来解决！</p> 
<h3><a name="t85"></a><a id="Kubernates_3218"></a>Kubernates简介</h3> 
<p>Kubernetes（简称，K8S）是Google开源的容器集群管理系统，在Docker技术的基础上，为容器化的应用提供部署运行、资源调度、服务发现和动态伸缩等一系列完整功能，提高了大规模容器集群管理的便捷性。 其主要功能如下：</p> 
<p>使用Docker对应用程序包装(package)、实例化(instantiate)、运行(run)。</p> 
<p>以集群的方式运行、管理跨机器的容器。以集群的方式运行、管理跨机器的容器。解决Docker跨机器容器之间的通讯问题。解决Docker跨机器容器之间的通讯问题。</p> 
<p>Kubernetes的自我修复机制使得容器集群总是运行在用户期望的状态。</p> 
<h3><a name="t86"></a><a id="KubernatesDockerJenkins_3230"></a>Kubernates+Docker+Jenkins持续集成架构图</h3> 
<p>大致工作流程：手动/自动构建 -&gt; Jenkins 调度 K8S API -＞动态生成 Jenkins Slave pod -＞ Slave pod拉取 Git 代码／编译／打包镜像 -＞推送到镜像仓库 Harbor -＞ Slave 工作完成，Pod 自动销毁 -＞部署到测试或生产 Kubernetes平台。（完全自动化，无需人工干预）</p> 
<h3><a name="t87"></a><a id="KubernatesDockerJenkins_3240"></a>Kubernates+Docker+Jenkins持续集成方案好处</h3> 
<p>服务高可用：当 Jenkins Master 出现故障时，Kubernetes 会自动创建一个新的 Jenkins Master</p> 
<p>容器，并且将 Volume 分配给新创建的容器，保证数据不丢失，从而达到集群服务高可用。</p> 
<p>动态伸缩，合理使用资源：每次运行 Job 时，会自动创建一个 Jenkins Slave，Job 完成后，Slave自动注销并删除容器，资源自动释放，而且 Kubernetes 会根据每个资源的使用情况，动态分配</p> 
<p>Slave 到空闲的节点上创建，降低出现因某节点资源利用率高，还排队等待在该节点的情况。扩展性好：当 Kubernetes 集群的资源严重不足而导致 Job 排队等待时，可以很容易的添加一个 Kubernetes Node 到集群中，从而实现扩展。</p> 
<h2><a name="t88"></a><a id="KubeadmKubernetes_3254"></a>Kubeadm安装Kubernetes</h2> 
<h3><a name="t89"></a><a id="Kubernetes_3256"></a>Kubernetes的架构</h3> 
<div class="table-box"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td></td><td>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-li8pNku5-1624726844543)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image410.jpg)]</td></tr></tbody></table></div>
<p>API Server：用于暴露Kubernetes API，任何资源的请求的调用操作都是通过kube-apiserver提供的接口进行的。</p> 
<p>Etcd：是Kubernetes提供默认的存储系统，保存所有集群数据，使用时需要为etcd数据提供备份计划。</p> 
<p>Controller-Manager：作为集群内部的管理控制中心，负责集群内的Node、Pod副本、服务端点</p> 
<p>（Endpoint）、命名空间（Namespace）、服务账号（ServiceAccount）、资源定额</p> 
<p>（ResourceQuota）的管理，当某个Node意外宕机时，Controller Manager会及时发现并执行自动化修复流程，确保集群始终处于预期的工作状态。</p> 
<p>Scheduler：监视新创建没有分配到Node的Pod，为Pod选择一个Node。</p> 
<p>Kubelet：负责维护容器的生命周期，同时负责Volume和网络的管理</p> 
<p>Kube proxy：是Kubernetes的核心组件，部署在每个Node节点上，它是实现Kubernetes Service的通信与负载均衡机制的重要组件。</p> 
<h3><a name="t90"></a><a id="_3288"></a>安装环境说明</h3> 
<div class="table-box"><table><thead><tr><th><strong>主机名称</strong></th><th><strong>IP</strong>地址</th><th><strong>安装的软件</strong></th></tr></thead><tbody><tr><td>代码托管服务器</td><td>192.168.66.100</td><td>Gitlab-12.4.2</td></tr><tr><td>Docker仓库服务器</td><td>192.168.66.102</td><td>Harbor1.9.2</td></tr><tr><td>k8s-master</td><td>192.168.66.101</td><td>kube-apiserver、kube-controller-manager、kube- scheduler、docker、etcd、calico，NFS</td></tr><tr><td>k8s-node1</td><td>192.168.66.103</td><td>kubelet、kubeproxy、Docker18.06.1-ce</td></tr><tr><td>k8s-node2</td><td>192.168.66.104</td><td>kubelet、kubeproxy、Docker18.06.1-ce</td></tr></tbody></table></div>
<p><strong>三台机器都需要完成</strong></p> 
<p><strong>修改三台机器的<strong><strong>hostname</strong></strong>及<strong><strong>hosts</strong></strong>文件</strong></p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-BPoRMle8-1624726844544)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image073.gif)]hostnamectl set-hostname k8s-master</p> 
<p>hostnamectl set-hostname k8s-node1 hostnamectl set-hostname k8s-node2</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-JEzXCI8T-1624726844544)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image073.gif)]cat &gt;&gt;/etc/hosts&lt;&lt;EOF 192.168.66.101 k8s-master 192.168.66.103 k8s-node1</p> 
<p>192.168.66.104 k8s-node2 EOF</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-DXlOT0pP-1624726844545)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image073.gif)]<strong>关闭防火墙和关闭****SELinux</strong> systemctl stop ﬁrewalld</p> 
<p>systemctl disable ﬁrewalld setenforce 0 临时关闭</p> 
<p>vi /etc/sysconﬁg/selinux 永久关闭</p> 
<p>改为SELINUX=disabled</p> 
<h3><a name="t91"></a><a id="_3334"></a>设置系统参数</h3> 
<p>设置允许路由转发，不对bridge的数据进行处理创建文件</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-nF65dwUC-1624726844545)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image073.gif)]vi /etc/sysctl.d/k8s.conf</p> 
<p>内容如下：</p> 
<p>net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1</p> 
<p>net.ipv4.ip_forward = 1 vm.swappiness = 0</p> 
<p>执行文件</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-Uw8UKH4S-1624726844546)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image073.gif)]sysctl -p /etc/sysctl.d/k8s.conf</p> 
<h3><a name="t92"></a><a id="kubeproxyipvs_3352"></a>kube-proxy开启ipvs的前置条件</h3> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-itWUaVcO-1624726844546)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image073.gif)]<strong>所有节点关闭****swap</strong> swapoﬀ -a 临时关闭 vi /etc/fstab 永久关闭注释掉以下字段</p> 
<p>/dev/mapper/cl-swap swap swap defaults 0 0</p> 
<h3><a name="t93"></a><a id="kubeletkubeadmkubectl_3364"></a>安装kubelet、kubeadm、kubectl</h3> 
<p>kubeadm: 用来初始化集群的指令。</p> 
<p>kubelet: 在集群中的每个节点上用来启动 pod 和 container 等。</p> 
<p>kubectl: 用来与集群通信的命令行工具。</p> 
<p>清空yum缓存</p> 
<p>设置yum安装源</p> 
<p>安装：</p> 
<p>kubelet设置开机启动（注意：先不启动，现在启动的话会报错）</p> 
<p>查看版本</p> 
<p>安装的是最新版本：Kubernetes v1.16.3（可能会变化）</p> 
<p><strong>Master****节点需要完成</strong> 1）运行初始化命令</p> 
<p>注意：apiserver-advertise-address这个地址必须是master机器的IP常用错误：</p> 
<p>错误一：[WARNING IsDockerSystemdCheck]: detected “cgroupfs” as the Docker cgroup driver</p> 
<p>作为Docker cgroup驱动程序。，Kubernetes推荐的Docker驱动程序是“systemd”</p> 
<p>解决方案：修改Docker的配置: vi /etc/docker/daemon.json，加入</p> 
<p>然后重启Docker</p> 
<p>错误二：[ERROR NumCPU]: the number of available CPUs 1 is less than the required 2</p> 
<p>解决方案：修改虚拟机的CPU的个数(处理器个数)，至少为2个</p> 
<p>安装过程日志：</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-PNPkDkqN-1624726844547)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image418.jpg)]</p> 
<p>最后，会提示节点安装的命令，必须记下来</p> 
<p>2）启动kubelet</p> 
<p>3）配置kubectl工具</p> 
<p>4）安装Calico</p> 
<p>5）等待几分钟，查看所有Pod的状态，确保所有Pod都是Running状态</p> 
<p>Slave节点需要完成</p> 
<p>1）让所有节点让集群环境</p> 
<p>使用之前Master节点产生的命令加入集群</p> 
<p>2）启动kubelet</p> 
<p>3）回到Master节点查看，如果Status全部为Ready，代表集群环境搭建成功！！！</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-qvgrnn7g-1624726844547)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image433.jpg)]</p> 
<h3><a name="t94"></a><a id="kubectl_3482"></a>kubectl常用命令</h3> 
<p>7、基于Kubernetes/K8S构建Jenkins持续集成平台(下)</p> 
<p>Jenkins-Master-Slave架构图回顾：</p> 
<div class="table-box"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td></td><td>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-58EODeEf-1624726844547)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image407.jpg)]</td></tr></tbody></table></div>
<h2><a name="t95"></a><a id="NFS_3502"></a>安装和配置NFS</h2> 
<h3><a name="t96"></a><a id="NFS_3504"></a>NFS简介</h3> 
<p>NFS（Network File System），它最大的功能就是可以通过网络，让不同的机器、不同的操作系统可以共享彼此的文件。我们可以利用NFS共享Jenkins运行的配置文件、Maven的仓库依赖文件等</p> 
<h3><a name="t97"></a><a id="NFS_3510"></a>NFS安装</h3> 
<p>我们把NFS服务器安装在192.168.66.101机器上</p> 
<p>1）安装NFS服务（在所有K8S的节点都需要安装）</p> 
<p>2）创建共享目录</p> 
<p>3）启动服务</p> 
<p>4）查看NFS共享目录</p> 
<h2><a name="t98"></a><a id="KubernetesJenkinsMaster_3534"></a>在Kubernetes安装Jenkins-Master</h2> 
<h3><a name="t99"></a><a id="NFS_client_provisioner_3536"></a>创建NFS client provisioner</h3> 
<p>nfs-client-provisioner 是一个Kubernetes的简易NFS的外部provisioner，本身不提供NFS，需要现有的NFS服务器提供存储。</p> 
<p>1）上传nfs-client-provisioner构建文件</p> 
<p>其中注意修改deployment.yaml，使用之前配置NFS服务器和目录</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-L7rYCvzd-1624726844548)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image443.jpg)]</p> 
<p>2）构建nfs-client-provisioner的pod资源</p> 
<p>3）查看pod是否创建成功</p> 
<p>安装Jenkins-Master</p> 
<p>1）上传Jenkins-Master构建文件</p> 
<p>其中有两点注意：</p> 
<p>第一、在StatefulSet.yaml文件，声明了利用nfs-client-provisioner进行Jenkins-Master文件存储</p> 
<p>第二、Service发布方法采用NodePort，会随机产生节点访问端口</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-3hteL145-1624726844548)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image452.jpg)]</p> 
<p>2）创建kube-ops的namespace</p> 
<p>因为我们把Jenkins-Master的pod放到kube-ops下</p> 
<p>3）构建Jenkins-Master的pod资源</p> 
<p>4）查看pod是否创建成功</p> 
<p>5）查看信息，并访问</p> 
<p>查看Pod运行在那个Node上</p> 
<p>查看分配的端口</p> 
<p>最终访问地址为：http://192.168.66.103:30136 （192.168.66.103为k8s-node1的IP）</p> 
<div class="table-box"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td></td><td>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-Uz401naD-1624726844549)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image460.jpg)]</td></tr></tbody></table></div>
<p>安装过程跟之前是一样的！</p> 
<p>6）先安装基本的插件</p> 
<p>Localization:Chinese Git</p> 
<p>Pipeline</p> 
<p>Extended Choice Parameter</p> 
<h2><a name="t100"></a><a id="JenkinsKubernetes_3640"></a>Jenkins与Kubernetes整合</h2> 
<h3><a name="t101"></a><a id="Kubernetes_3642"></a>安装Kubernetes插件</h3> 
<p>系统管理-&gt;插件管理-&gt;可选插件Kubernetes</p> 
<h3><a name="t102"></a><a id="JenkinsKubernetes_3646"></a>实现Jenkins与Kubernetes整合</h3> 
<p>系统管理-&gt;系统配置-&gt;云-&gt;新建云-&gt;Kubernetes</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-6QKAy2hR-1624726844549)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image463.jpg)]</p> 
<p>kubernetes地址采用了kube的服务器发现：<a href="https://kubernetes.default.svc.cluster.local/">https://kubernetes.default.svc.cluster.local</a></p> 
<p>namespace填kube-ops，然后点击Test Connection，如果出现 Connection test successful 的提示信息证明 Jenkins 已经可以和 Kubernetes 系统正常通信</p> 
<p>Jenkins URL 地址：http://jenkins.kube-ops.svc.cluster.local:8080</p> 
<h2><a name="t103"></a><a id="JenkinsSlave_3666"></a>构建Jenkins-Slave自定义镜像</h2> 
<p>Jenkins-Master在构建Job的时候，Kubernetes会创建Jenkins-Slave的Pod来完成Job的构建。我们选择运行Jenkins-Slave的镜像为官方推荐镜像：jenkins/jnlp-slave:latest，但是这个镜像里面并没有Maven环境，为了方便使用，我们需要自定义一个新的镜像：</p> 
<p>准备材料：</p> 
<p>Dockerﬁle文件内容如下：</p> 
<p>构建出一个新镜像：jenkins-slave-maven:latest然把镜像上传到Harbor的公共库library中</p> 
<h2><a name="t104"></a><a id="JenkinsSlave_3688"></a>测试Jenkins-Slave是否可以创建</h2> 
<p>1）创建一个Jenkins流水线项目</p> 
<p>test_jenkins_slave</p> 
<p>2）编写Pipeline，从GItlab拉取代码</p> 
<p>3）查看构建日志</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-kcZJqfA5-1624726844550)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image470.jpg)]</p> 
<h2><a name="t105"></a><a id="JenkinsKubernetesDocker_3714"></a>Jenkins+Kubernetes+Docker完成微服务持续集成</h2> 
<h3><a name="t106"></a><a id="_3716"></a>拉取代码，构建镜像</h3> 
<p>1）创建NFS共享目录</p> 
<p>让所有Jenkins-Slave构建指向NFS的Maven的共享仓库目录</p> 
<p>2）创建项目，编写构建Pipeline</p> 
<p>注意：在构建过程会发现无法创建仓库目录，是因为NFS共享目录权限不足，需更改权限</p> 
<p>还有Docker命令执行权限问题</p> 
<p>需要手动上传父工程依赖到NFS的Maven共享仓库目录中</p> 
<h3><a name="t107"></a><a id="K8S_3742"></a>微服务部署到K8S</h3> 
<p>修改每个微服务的application.yml Eureka</p> 
<p>其他微服务需要注册到所有Eureka中</p> 
<p>1）安装Kubernetes Continuous Deploy插件</p> 
<p>2）修改后的流水线脚本</p> 
<p>3）建立k8s认证凭证</p> 
<p>[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-a0UUcJMK-1624726844550)(file:///C:/Users/HAN/AppData/Local/Temp/msohtmlclip1/01/clip_image481.jpg)]</p> 
<p>kubeconﬁg到k8s的Master节点复制</p> 
<p>5）生成Docker凭证</p> 
<p>Docker凭证，用于Kubernetes到Docker私服拉取镜像</p> 
<p>6）在每个项目下建立deploy.xml</p> 
<p>Eureka的deply.yml</p> 
<p>其他项目的deploy.yml主要把名字和端口修改：</p> 
<p>7）项目构建后，查看服务创建情况</p> 
<p>效果如下：</p>
                </div><div data-report-view="{&quot;mod&quot;:&quot;1585297308_001&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6548&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/details/118233786&quot;,&quot;extend1&quot;:&quot;pc&quot;,&quot;ab&quot;:&quot;new&quot;}"><div></div></div>
                <link href="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/markdown_views-d7a94ec6ab.css" rel="stylesheet">
                <link href="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/style-49037e4d27.css" rel="stylesheet">
        </div>
    </article>
</div>
<div class="more-toolbox-new more-toolbox-active" id="toolBarBox">
    <div class="left-toolbox" style="position: fixed; z-index: 999; left: 427.5px; bottom: 0px; width: 1010px;">
        <div class="toolbox-left">
            <div class="profile-box"><a class="profile-href" target="_blank" href="https://blog.csdn.net/hancoder"><img class="profile-img" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/3_hancoder"><span class="profile-name">hancoder</span></a></div>
            <div class="profile-attend">
                    <a class="tool-attend tool-bt-button tool-bt-attend" href="javascript:;">关注</a>
                <a class="tool-item-follow active-animation" style="display:none;">关注</a>
            </div>
        </div>
        <div class="toolbox-middle">
        <ul class="toolbox-list">
            <li class="tool-item tool-item-size tool-active is-like" id="is-like">
            <a class="tool-item-href">
                <img style="display:none;" id="is-like-imgactive-animation-like" class="animation-dom active-animation" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/tobarThumbUpactive.png" alt="">
                <img class="isactive" style="display:none" id="is-like-imgactive" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/newHeart2021Active.png" alt="">
                <img class="isdefault" style="display:block" id="is-like-img" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/newHeart2021White.png" alt="">  
                <span id="spanCount" class="count ">
                        18
                </span>
            </a>
            <div class="tool-hover-tip"><span class="text space">点赞</span></div>
            </li>
            <li class="tool-item tool-item-size tool-active is-unlike" id="is-unlike">
            <a class="tool-item-href">
                <img class="isactive" style="margin-right:0px;display:none" id="is-unlike-imgactive" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/newUnHeart2021Active.png" alt="">
                <img class="isdefault" style="margin-right:0px;display:block" id="is-unlike-img" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/newUnHeart2021White.png" alt="">
                <span id="unlikeCount" class="count "></span>
            </a>
            <div class="tool-hover-tip"><span class="text space">踩</span></div>
            </li>
            <li class="tool-item tool-item-size tool-active tool-item-comment">
            <a class="tool-item-href" href="https://blog.csdn.net/hancoder/article/details/118233786#commentBox">
                <img class="isdefault" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/newComment2021White.png" alt="">
                <span class="count">
                    4
                </span>
            </a>
            <div class="tool-hover-tip"><span class="text space">评论</span></div>
            </li>
            <li class="tool-item tool-item-size tool-active is-collection ">
            <a class="tool-item-href" href="javascript:;" data-report-click="{&quot;mod&quot;:&quot;popu_824&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4130&quot;,&quot;ab&quot;:&quot;new&quot;}">
                <img style="display:none" id="is-collection-img-collection" class="animation-dom active-animation" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/tobarCollectionActive.png" alt="">
                <img class="isdefault" id="is-collection-img" style="display:block" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/newCollectWhite.png" alt="">
                <img class="isactive" id="is-collection-imgactive" style="display:none" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/newCollectActive.png" alt="">
                <span class="count get-collection " id="get-collection">
                    63
                </span>
            </a>
            <div class="tool-hover-tip"><span class="text space">收藏</span></div>
            </li>
            <li class="tool-item tool-active">
                <a class="" href="javascript:;">
                    <img class="company active" id="health-companies" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/newHealthCompanies1Active.gif" alt="一键三连">
                </a>
                <div class="tool-hover-tip three-click"><span class="text">一键三连</span></div>
            </li>
            <li class="tool-item tool-item-bar">
            </li>
            <li class="tool-item tool-item-size tool-active tool-QRcode" id="tool-share">
                <a class="tool-item-href" href="javascript:;" data-report-click="{&quot;mod&quot;:&quot;1582594662_002&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4129&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <img class="isdefault" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/newShareWhite.png" alt="">
                </a>
                <div class="QRcode" id="tool-QRcode">
                    <p class="title">
                    扫一扫，分享海报
                    </p>
                    <div id="shareCode" title="https://app-blog.csdn.net/share?article_id=118233786&amp;username=hancoder&amp;utm_source=po_popup"><canvas width="144" height="144" style="display: none;"></canvas><img style="display: block;" src=""></div>
                </div>
            </li>
        </ul>
        </div>
        <div class="toolbox-right">
                <div class="tool-directory">
                    <a class="bt-columnlist-show" data-id="11140481" data-free="true" data-subscribe="false" data-title="k8s" data-img="https://img-blog.csdnimg.cn/20210704200028250.png?x-oss-process=image/resize,m_fixed,h_224,w_224" data-url="https://blog.csdn.net/hancoder/category_11140481.html" data-sum="13" data-people="25" data-price="0" data-oldprice="0" data-join="false" data-studyvip="false" data-studysubscribe="false" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.6334&quot;,&quot;extend1&quot;:&quot;专栏目录&quot;}">专栏目录</a>
                </div>
        </div>
    </div>  
</div>
<script type="text/javascript" crossorigin="" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/qrcode-7c90a92189.min.js"></script>
<script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/saved_resource(2)" type="text/javascript"></script>
<script type="text/javascript" crossorigin="" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/user-login.js"></script>
<script type="text/javascript" crossorigin="" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/collection-box.js"></script>
                <div class="first-recommend-box recommend-box">
<div class="recommend-item-box type_download clearfix" data-url="https://download.csdn.net/download/weixin_38692202/14932553" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6661.1&quot;,&quot;mod&quot;:&quot;popu_871&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant_t0.none-task-download-2~default~CTRLIST~default-1.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;1&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/weixin_38692202/14932553&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://download.csdn.net/download/weixin_38692202/14932553" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6661.1&quot;,&quot;mod&quot;:&quot;popu_871&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant_t0.none-task-download-2~default~CTRLIST~default-1.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;1&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/weixin_38692202/14932553&quot;}" data-report-query="spm=1001.2101.3001.6661.1&amp;utm_medium=distribute.pc_relevant_t0.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant_t0.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link">
					<div class="left ellipsis-online ellipsis-online-1"><em>jenkins</em>                         + Git 搭建<em>持续集成</em><em>环境</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">01-26</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://download.csdn.net/download/weixin_38692202/14932553" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6661.1&quot;,&quot;mod&quot;:&quot;popu_871&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant_t0.none-task-download-2~default~CTRLIST~default-1.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;1&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/weixin_38692202/14932553&quot;}" data-report-query="spm=1001.2101.3001.6661.1&amp;utm_medium=distribute.pc_relevant_t0.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant_t0.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link">
				<div class="desc ellipsis-online ellipsis-online-1"><em>持续集成</em>通过自动化构建、自动化测试以及自动化部署加上较高的<em>集成</em>频率保证了开发系统中的问题能迅速被发现和修复，降低了<em>集成</em>失败的风险，使得系统在开发中始终保持在一个稳定健康的<em>集成</em>状态。<em>jenkins</em>是目前广泛应用的<em>持续集成</em>工具，本文记录我使用<em>jenkins</em>+Git配置<em>持续集成</em><em>环境</em>的整个流程以及踩到的坑（<em>jenkins</em>过程的坑往往不是在第一次配置，而是在配置结束后更改某些配置项的时候踩到）。</div>
			</a>
		</div>
	</div>
</div>
                </div>
            <div class="second-recommend-box recommend-box">
<div class="recommend-item-box type_download clearfix" data-url="http://download.csdn.net/download/eagle_zhou/4046050" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.1&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-1.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;1&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;http://download.csdn.net/download/eagle_zhou/4046050&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="http://download.csdn.net/download/eagle_zhou/4046050" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.1&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-1.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;1&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;http://download.csdn.net/download/eagle_zhou/4046050&quot;}" data-report-query="spm=1001.2101.3001.6650.1&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link">
					<div class="left ellipsis-online ellipsis-online-1">什么是url，由哪几部分组成，具体实例</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">02-05</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="http://download.csdn.net/download/eagle_zhou/4046050" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.1&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-1.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;1&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;http://download.csdn.net/download/eagle_zhou/4046050&quot;}" data-report-query="spm=1001.2101.3001.6650.1&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link">
				<div class="desc ellipsis-online ellipsis-online-1">什么是Url，由哪几部分组成，具体实例//尤其现在在移动应用开发当中运用广泛</div>
			</a>
		</div>
	</div>
</div>
            </div>
<a id="commentBox" name="commentBox"></a>
<div class="comment-box">
	<div class="comment-edit-box d-flex">
		<a id="commentsedit"></a>
		<div class="user-img">
			<a href="javascript:void(0);">
				<img class="show_loginbox" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/anonymous-User-img.png">
			</a>
		</div>
		<form id="commentform">
			
      <textarea class="comment-content" name="comment_content" id="comment_content" placeholder="优质评论可以帮助作者获得更高权重" maxlength="1000"></textarea>
			<div class="comment-emoticon"><img class="comment-emoticon-img" data-url="https://csdnimg.cn/release/blogv2/dist/pc/img/" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/emoticon.png" alt="表情包"></div> 
      <span class="comment-emoticon-tip">插入表情</span>
      <div class="comment-emoticon-box">
        <div class="comment-emoticon-img-box"></div>
			</div>
      <div class="opt-box">
				<div id="ubbtools" class="add_code">
					<a href="https://blog.csdn.net/hancoder/article/details/118233786#insertcode" code="code" target="_self"><i class="icon iconfont icon-daima"></i></a>
				</div>
				<input type="hidden" id="comment_replyId" name="comment_replyId">
				<input type="hidden" id="article_id" name="article_id" value="118233786">
				<input type="hidden" id="comment_userId" name="comment_userId" value="">
				<input type="hidden" id="commentId" name="commentId" value="">
				<div class="dropdown" id="myDrap">
					<a class="dropdown-face d-flex align-items-center" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
						<div class="txt-selected text-truncate">添加代码片</div>
						<svg class="icon d-block" width="200px" height="100.00px" viewBox="0 0 2048 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M597.33333292 298.666667h853.333334L1023.99999992 725.333333 597.33333292 298.666667z"></path></svg>
					</a>
					<ul class="dropdown-menu" id="commentCode" aria-labelledby="drop4">
						<li><a data-code="html">HTML/XML</a></li>
						<li><a data-code="objc">objective-c</a></li>
						<li><a data-code="ruby">Ruby</a></li>
						<li><a data-code="php">PHP</a></li>
						<li><a data-code="csharp">C</a></li>
						<li><a data-code="cpp">C++</a></li>
						<li><a data-code="javascript">JavaScript</a></li>
						<li><a data-code="python">Python</a></li>
						<li><a data-code="java">Java</a></li>
						<li><a data-code="css">CSS</a></li>
						<li><a data-code="sql">SQL</a></li>
						<li><a data-code="plain">其它</a></li>
					</ul>
				</div>
				<div class="right-box" id="rightBox" data-type="2">
							<span id="tip_comment" class="tip">还能输入<em>1000</em>个字符</span>
							<a data-report-click="{&quot;mod&quot;:&quot;1582594662_003&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4227&quot;,&quot;ab&quot;:&quot;new&quot;}"><input type="submit" class="btn btn-sm btn-comment" value="发表评论"></a>
				</div>
			</div>
		</form>
		<input type="button" class="bt-comment-show" value="评论">
	</div>
	<div class="comment-list-container" style="display: block;">
		<a id="comments"></a>
		<div class="comment-list-box" style="overflow: hidden; max-height: 133px;"><ul class="comment-list"><li class="comment-line-box d-flex" data-commentid="18768282" data-replyname="xiten"><div style="display: flex;width: 100%;">      <a target="_blank" href="https://blog.csdn.net/xiten"><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/3_xiten" username="xiten" alt="xiten" class="avatar"></a>        <div class="right-box ">          <div class="new-info-box clearfix">            <a target="_blank" href="https://blog.csdn.net/xiten"><span class="name ">xiao_teng_</span></a><span class="colon">:</span><span class="floor-num"></span><span class="new-comment">老哥，跟着黑马写的嘛，多谢啦</span><span class="date" title="2021-10-29 10:18:29">昨天</span><span class="new-opt-floating"><a class="btn-bt  btn-reply" data-type="reply" data-flag="true">回复</a><a class="btn-bt  btn-report"><img class="btn-report-img" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/commentMore.png" title=""><span data-type="report" class="hide-report">举报</span></a></span></div><div class="comment-like " data-commentid="18768282"><img class="comment-like-img unclickImg" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/commentUnHeart.png" title="点赞"><img class="comment-like-img comment-like-img-hover" style="display:none" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/commentActiveHeart.png" title="点赞"><img class="comment-like-img clickedImg" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/commentActiveHeart.png" title="点赞"><span></span></div></div></div></li></ul><ul class="comment-list"><li class="comment-line-box d-flex" data-commentid="18608883" data-replyname="m0_38143103"><div style="display: flex;width: 100%;">      <a target="_blank" href="https://blog.csdn.net/m0_38143103"><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/3_m0_38143103" username="m0_38143103" alt="m0_38143103" class="avatar"></a>        <div class="right-box ">          <div class="new-info-box clearfix">            <a target="_blank" href="https://blog.csdn.net/m0_38143103"><span class="name ">多啦的a梦</span></a><span class="colon">:</span><span class="floor-num"></span><span class="new-comment">tomcat-user.xml配置文件有错误没有纠正</span><span class="date" title="2021-10-15 09:27:04">15 天前</span><span class="new-opt-floating"><a class="btn-bt  btn-reply" data-type="reply" data-flag="true">回复</a><a class="btn-bt  btn-report"><img class="btn-report-img" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/commentMore.png" title=""><span data-type="report" class="hide-report">举报</span></a></span></div><div class="comment-like " data-commentid="18608883"><img class="comment-like-img unclickImg" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/commentUnHeart.png" title="点赞"><img class="comment-like-img comment-like-img-hover" style="display:none" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/commentActiveHeart.png" title="点赞"><img class="comment-like-img clickedImg" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/commentActiveHeart.png" title="点赞"><span></span></div></div></div></li></ul><ul class="comment-list"><li class="comment-line-box d-flex" data-commentid="18273520" data-replyname="lu1171901273"><div style="display: flex;width: 100%;">      <a target="_blank" href="https://blog.csdn.net/lu1171901273"><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/3_lu1171901273" username="lu1171901273" alt="lu1171901273" class="avatar"></a>        <div class="right-box ">          <div class="new-info-box clearfix">            <a target="_blank" href="https://blog.csdn.net/lu1171901273"><span class="name ">@进行中</span></a><span class="colon">:</span><span class="floor-num"></span><span class="new-comment">大佬，那个ssh自动部署的脚本没有执行，为什么</span><span class="date" title="2021-09-11 10:08:25">1 月前</span><span class="new-opt-floating"><a class="btn-bt  btn-reply" data-type="reply" data-flag="true">回复</a><a class="btn-bt  btn-report"><img class="btn-report-img" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/commentMore.png" title=""><span data-type="report" class="hide-report">举报</span></a></span></div><div class="comment-like " data-commentid="18273520"><img class="comment-like-img unclickImg" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/commentUnHeart.png" title="点赞"><img class="comment-like-img comment-like-img-hover" style="display:none" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/commentActiveHeart.png" title="点赞"><img class="comment-like-img clickedImg" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/commentActiveHeart.png" title="点赞"><span></span></div></div></div></li></ul><ul class="comment-list"><li class="comment-line-box d-flex" data-commentid="17271618" data-replyname="qq_39046854"><div style="display: flex;width: 100%;">      <a target="_blank" href="https://blog.csdn.net/qq_39046854"><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/3_qq_39046854" username="qq_39046854" alt="qq_39046854" class="avatar"></a>        <div class="right-box ">          <div class="new-info-box clearfix">            <a target="_blank" href="https://blog.csdn.net/qq_39046854"><span class="name ">大家一起学编程（python）</span></a><span class="colon">:</span><span class="floor-num"></span><span class="new-comment">学到了</span><span class="date" title="2021-06-30 00:06:07">4 月前</span><span class="new-opt-floating"><a class="btn-bt  btn-reply" data-type="reply" data-flag="true">回复</a><a class="btn-bt  btn-report"><img class="btn-report-img" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/commentMore.png" title=""><span data-type="report" class="hide-report">举报</span></a></span></div><div class="comment-like " data-commentid="17271618"><img class="comment-like-img unclickImg" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/commentUnHeart.png" title="点赞"><img class="comment-like-img comment-like-img-hover" style="display:none" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/commentActiveHeart.png" title="点赞"><img class="comment-like-img clickedImg" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/commentActiveHeart.png" title="点赞"><span></span></div></div></div></li></ul></div>
		<div id="commentPage" class="pagination-box d-none" style="display: block;"><div id="Paging_014178887897954429" class="ui-paging-container"><ul><li class="js-page-first js-page-action ui-pager ui-pager-disabled"></li><li class="js-page-prev js-page-action ui-pager ui-pager-disabled">&lt;</li><li data-page="1" class="ui-pager focus">1</li><li class="js-page-next js-page-action ui-pager ui-pager-disabled">&gt;</li><li class="js-page-last js-page-action ui-pager ui-pager-disabled"></li></ul></div></div>
		<div class="opt-box text-center">
			<div class="btn btn-sm btn-link-blue" id="btnMoreComment"><span>登录 查看 4 条热评</span><img class="look-more-comment" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/arrowDownComment.png"></div>
		</div>
	</div>
</div>            <div class="recommend-box insert-baidu-box">
                <div class="recommend-item-box clearfix" style="display:none"></div><div class="recommend-item-box baiduSearch clearfix" data-type="blog" data-report-view="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-0.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;,\&quot;parent_index\&quot;:\&quot;0\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.1&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/kefengwang/article/details/54233584&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_title~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;0&quot;}">	                <div class="content-box">		                <div class="content-blog display-flex">			                  <div class="title-box">				                  <a class="tit" href="https://blog.csdn.net/kefengwang/article/details/54233584" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-0.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;,\&quot;parent_index\&quot;:\&quot;0\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.1&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/kefengwang/article/details/54233584&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_title~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;0&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-0.no_search_link&amp;spm=1001.2101.3001.4242.1">					                <div class="left ellipsis-online ellipsis-online-1"><em>Jenkins</em> <em>持续集成</em>综合<em>实战</em>_kefeng.wang 的博客-CSDN博...</div>				                  </a>			                  </div>                    <div class="info-box display-flex">                      <div class="info display-flex">                        <span class="info-block">9-15</span>                      </div>                    </div>                  </div>                  <div class="desc-box">                    <a href="https://blog.csdn.net/kefengwang/article/details/54233584" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-0.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;,\&quot;parent_index\&quot;:\&quot;0\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.1&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/kefengwang/article/details/54233584&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_title~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;0&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-0.no_search_link&amp;spm=1001.2101.3001.4242.1">                      <div class="desc ellipsis-online ellipsis-online-1"><em>Jenkins</em> 是一款流行的开源<em>持续集成</em>(Continuous Integration)工具,广泛用于项目开发,具有自动化构建、测试和部署等功能。本文以 CentOS7 <em>环境</em>为例,总结了 <em>Jenkins</em> 的安装与配置、邮件功能使用,并接入阿里巴巴的著名开源项目 fastjson,以此演示 ...</div>                    </a>                  </div>                </div>              </div><div class="recommend-item-box baiduSearch clearfix" data-type="blog" data-report-view="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-1.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;,\&quot;parent_index\&quot;:\&quot;0\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.2&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/yu1014745867/article/details/72843088&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_title~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;1&quot;}">	                <div class="content-box">		                <div class="content-blog display-flex">			                  <div class="title-box">				                  <a class="tit" href="https://blog.csdn.net/yu1014745867/article/details/72843088" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-1.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;,\&quot;parent_index\&quot;:\&quot;0\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.2&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/yu1014745867/article/details/72843088&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_title~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;1&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-1.no_search_link&amp;spm=1001.2101.3001.4242.2">					                <div class="left ellipsis-online ellipsis-online-1">...<em>持续集成</em><em>环境</em>部署(入门篇)_鱼小鱼的博客_<em>jenkins</em><em>持续</em>...</div>				                  </a>			                  </div>                    <div class="info-box display-flex">                      <div class="info display-flex">                        <span class="info-block">10-29</span>                      </div>                    </div>                  </div>                  <div class="desc-box">                    <a href="https://blog.csdn.net/yu1014745867/article/details/72843088" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-1.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;,\&quot;parent_index\&quot;:\&quot;0\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.2&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/yu1014745867/article/details/72843088&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_title~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;1&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-1.no_search_link&amp;spm=1001.2101.3001.4242.2">                      <div class="desc ellipsis-online ellipsis-online-1"><em>Jenkins</em><em>持续集成</em><em>环境</em>部署(入门篇) 为什么要<em>持续集成</em> <em>持续集成</em>是一种软件开发实践,即团队开发成员经常<em>集成</em>它们的工作,通过每个成员每天至少<em>集成</em>一次,也就意味着每天可能会发生多次<em>集成</em>。每次<em>集成</em>都通过自动化的构建(包括编译,发布,自动化测试)...</div>                    </a>                  </div>                </div>              </div>
<div class="recommend-item-box type_download clearfix" data-url="http://download.csdn.net/download/machen_smiling/10981130" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.2&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-2.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;2&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;http://download.csdn.net/download/machen_smiling/10981130&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="http://download.csdn.net/download/machen_smiling/10981130" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.2&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-2.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;2&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;http://download.csdn.net/download/machen_smiling/10981130&quot;}" data-report-query="spm=1001.2101.3001.6650.2&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-2.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-2.no_search_link">
					<div class="left ellipsis-online ellipsis-online-1"><em>Jenkins</em>+Gitlab<em>持续集成</em>综合<em>实战</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">02-28</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="http://download.csdn.net/download/machen_smiling/10981130" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.2&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-2.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;2&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;http://download.csdn.net/download/machen_smiling/10981130&quot;}" data-report-query="spm=1001.2101.3001.6650.2&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-2.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-2.no_search_link">
				<div class="desc ellipsis-online ellipsis-online-1">一、<em>持续集成</em>应用背景：
二、<em>持续集成</em>概述：
三、<em>持续</em>交付概述：
四、<em>持续</em>部署概述：
五、<em>Jenkins</em>概述：
六、案例：部署<em>Jenkins</em>+Gitlab<em>持续集成</em></div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_download clearfix" data-url="http://download.csdn.net/download/u012077743/6246101" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.3&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-3.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;3&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;http://download.csdn.net/download/u012077743/6246101&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="http://download.csdn.net/download/u012077743/6246101" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.3&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-3.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;3&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;http://download.csdn.net/download/u012077743/6246101&quot;}" data-report-query="spm=1001.2101.3001.6650.3&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-3.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-3.no_search_link">
					<div class="left ellipsis-online ellipsis-online-1">URI和URL区别 .</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">09-10</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="http://download.csdn.net/download/u012077743/6246101" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.3&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-3.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;3&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;http://download.csdn.net/download/u012077743/6246101&quot;}" data-report-query="spm=1001.2101.3001.6650.3&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-3.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-3.no_search_link">
				<div class="desc ellipsis-online ellipsis-online-1">URI和URL区别 .</div>
			</a>
		</div>
	</div>
</div><div class="recommend-item-box baiduSearch clearfix" data-type="blog" data-report-view="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-4.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;,\&quot;parent_index\&quot;:\&quot;3\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.3&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/lovexiaotaozi/article/details/88305424&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_title~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;4&quot;}">	                <div class="content-box">		                <div class="content-blog display-flex">			                  <div class="title-box">				                  <a class="tit" href="https://blog.csdn.net/lovexiaotaozi/article/details/88305424" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-4.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;,\&quot;parent_index\&quot;:\&quot;3\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.3&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/lovexiaotaozi/article/details/88305424&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_title~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;4&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-4.no_search_link&amp;spm=1001.2101.3001.4242.3">					                <div class="left ellipsis-online ellipsis-online-1"><em>【</em>工程化专题<em>】</em><em>Jenkins</em><em>持续集成</em> 从入门到<em>实战</em>_老汉健身...</div>				                  </a>			                  </div>                    <div class="info-box display-flex">                      <div class="info display-flex">                        <span class="info-block">9-29</span>                      </div>                    </div>                  </div>                  <div class="desc-box">                    <a href="https://blog.csdn.net/lovexiaotaozi/article/details/88305424" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-4.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;,\&quot;parent_index\&quot;:\&quot;3\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.3&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/lovexiaotaozi/article/details/88305424&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_title~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;4&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-4.no_search_link&amp;spm=1001.2101.3001.4242.3">                      <div class="desc ellipsis-online ellipsis-online-1">摘要:<em>jenkins</em> <em>持续集成</em> docker springboot maven conding.net 定义:<em>Jenkins</em>是一个开源软件项目,是基于Java开发的一种<em>持续集成</em>工具,用于监控<em>持续</em>重复的工作,旨在提供一个开放易用的软件平台,使软件的<em>持续集成</em>变成可能.---百度百科 个人理解...</div>                    </a>                  </div>                </div>              </div><div class="recommend-item-box baiduSearch clearfix" data-type="blog" data-report-view="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-5.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;,\&quot;parent_index\&quot;:\&quot;3\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.4&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_40907977/article/details/103697860&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_title~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;5&quot;}">	                <div class="content-box">		                <div class="content-blog display-flex">			                  <div class="title-box">				                  <a class="tit" href="https://blog.csdn.net/qq_40907977/article/details/103697860" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-5.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;,\&quot;parent_index\&quot;:\&quot;3\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.4&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_40907977/article/details/103697860&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_title~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;5&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-5.no_search_link&amp;spm=1001.2101.3001.4242.4">					                <div class="left ellipsis-online ellipsis-online-1"><em>Jenkins</em>多<em>环境</em><em>持续集成</em>架构实践_寰宇001的博客</div>				                  </a>			                  </div>                    <div class="info-box display-flex">                      <div class="info display-flex">                        <span class="info-block">8-19</span>                      </div>                    </div>                  </div>                  <div class="desc-box">                    <a href="https://blog.csdn.net/qq_40907977/article/details/103697860" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-5.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;,\&quot;parent_index\&quot;:\&quot;3\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.4&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_40907977/article/details/103697860&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_title~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;5&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-5.no_search_link&amp;spm=1001.2101.3001.4242.4">                      <div class="desc ellipsis-online ellipsis-online-1">自动化部署主要是为了解决项目多、<em>环境</em>多、<em>持续集成</em>慢、部署操作麻烦、手动操作易出错、自动化运维等问题。 1 <em>Jenkins</em>是开源CI&amp;CD软件领导者, 提供超过1000个插件来支持构建、部署、自动化, 满足任何项目的需要。 </div>                    </a>                  </div>                </div>              </div>
		
<div class="recommend-item-box type_download clearfix" data-url="http://download.csdn.net/download/weixin_38698539/15454098" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.4&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-4.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;4&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;http://download.csdn.net/download/weixin_38698539/15454098&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="http://download.csdn.net/download/weixin_38698539/15454098" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.4&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-4.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;4&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;http://download.csdn.net/download/weixin_38698539/15454098&quot;}" data-report-query="spm=1001.2101.3001.6650.4&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-4.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-4.no_search_link">
					<div class="left ellipsis-online ellipsis-online-1"><em>Jenkins</em><em>持续集成</em>综合<em>实战</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">02-25</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="http://download.csdn.net/download/weixin_38698539/15454098" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.4&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-4.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;4&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;http://download.csdn.net/download/weixin_38698539/15454098&quot;}" data-report-query="spm=1001.2101.3001.6650.4&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-4.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-4.no_search_link">
				<div class="desc ellipsis-online ellipsis-online-1">官网:https://<em>jenkins</em>.io/<em>Jenkins</em>自身采用Java开发，所以要必须安装JDK；本文<em>集成</em>的项目基于Maven构架，所以Maven也必须安装；两者的安装方法请参考我的另一篇文章：Tomcat安装及其单机多实例部署以下四种方法任选一种，推荐第一种。安装并启动Tomcat；从官网下载<em>jenkins</em>.war至$CATALINA_BASE/webapps，Tomcat会自动部署；浏览器访问：http://centos:8080/<em>jenkins</em>/安装目录:/usr/lib/<em>jenkins</em>工作目录:/var/lib/<em>jenkins</em>(对应于<em>环境</em>变量<em>JENKINS</em>_HOME)查看日志文件:</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_41645232/article/details/106195313" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.5&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-5.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;5&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_41645232/article/details/106195313&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_41645232/article/details/106195313" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.5&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-5.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;5&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_41645232/article/details/106195313&quot;}" data-report-query="spm=1001.2101.3001.6650.5&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-5.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-5.no_search_link">
					<div class="left ellipsis-online ellipsis-online-1">Linux系列之CentOS7安装gitlab</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_41645232" target="_blank"><span class="blog-title">weixin_41645232的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">05-18</span>
					<span class="info-block read"><img class="read-img" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/readCountWhite.png" alt="">
					119
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_41645232/article/details/106195313" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.5&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-5.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;5&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_41645232/article/details/106195313&quot;}" data-report-query="spm=1001.2101.3001.6650.5&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-5.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-5.no_search_link">
				<div class="desc ellipsis-online ellipsis-online-1">1. 安装相关依赖


yum -y <em>ins</em>tall policycoreutils ope<em>ns</em>sh-server ope<em>ns</em>sh-clients postﬁx

2. 启动ssh服务&amp;设置为开机启动


systemctl enable sshd
systemctl start sshd

3. 设置postﬁx开机自启，并启动，postﬁx支持gitlab发信功能


systemctl enable postﬁx systemctl start postﬁx

4. 开放ssh以及http服务</div>
			</a>
		</div>
	</div>
</div><div class="recommend-item-box baiduSearch clearfix" data-type="blog" data-report-view="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-8.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;,\&quot;parent_index\&quot;:\&quot;5\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.5&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/m0_37923316/article/details/106623398&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_title~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;8&quot;}">	                <div class="content-box">		                <div class="content-blog display-flex">			                  <div class="title-box">				                  <a class="tit" href="https://blog.csdn.net/m0_37923316/article/details/106623398" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-8.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;,\&quot;parent_index\&quot;:\&quot;5\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.5&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/m0_37923316/article/details/106623398&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_title~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;8&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-8.no_search_link&amp;spm=1001.2101.3001.4242.5">					                <div class="left ellipsis-online ellipsis-online-1"><em>持续集成</em>工具<em>Jenkins</em><em>实战</em>详解_World哥</div>				                  </a>			                  </div>                    <div class="info-box display-flex">                      <div class="info display-flex">                        <span class="info-block">10-23</span>                      </div>                    </div>                  </div>                  <div class="desc-box">                    <a href="https://blog.csdn.net/m0_37923316/article/details/106623398" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-8.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;,\&quot;parent_index\&quot;:\&quot;5\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.5&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/m0_37923316/article/details/106623398&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_title~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;8&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-8.no_search_link&amp;spm=1001.2101.3001.4242.5">                      <div class="desc ellipsis-online ellipsis-online-1">version: '3' services: <em>jenkins</em>: image: <em>jenkins</em>ci/blueocean container_name: <em>jenkins</em>-blueocean #运行容器的角色为root用户 user: root #使用该参数,container内的root拥有真正的root权限。否则,container内的root只是外部的一个普通...</div>                    </a>                  </div>                </div>              </div><div class="recommend-item-box baiduSearch clearfix" data-type="blog" data-report-view="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-9.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;,\&quot;parent_index\&quot;:\&quot;5\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.6&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/tysite/article/details/94722349&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_title~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;9&quot;}">	                <div class="content-box">		                <div class="content-blog display-flex">			                  <div class="title-box">				                  <a class="tit" href="https://blog.csdn.net/tysite/article/details/94722349" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-9.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;,\&quot;parent_index\&quot;:\&quot;5\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.6&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/tysite/article/details/94722349&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_title~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;9&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-9.no_search_link&amp;spm=1001.2101.3001.4242.6">					                <div class="left ellipsis-online ellipsis-online-1"><em>Jenkins</em> <em>持续集成</em><em>环境</em>搭建_tysite的博客_<em>jenkins</em><em>持续</em>...</div>				                  </a>			                  </div>                    <div class="info-box display-flex">                      <div class="info display-flex">                        <span class="info-block">10-22</span>                      </div>                    </div>                  </div>                  <div class="desc-box">                    <a href="https://blog.csdn.net/tysite/article/details/94722349" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-9.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;,\&quot;parent_index\&quot;:\&quot;5\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.6&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/tysite/article/details/94722349&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_title~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;9&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-9.no_search_link&amp;spm=1001.2101.3001.4242.6">                      <div class="desc ellipsis-online ellipsis-online-1"><em>Jenkins</em> <em>持续集成</em><em>环境</em>搭建 官方文档:https://<em>jenkins</em>.io/zh/doc/ 1、CentOS 7.4 安装过程 首先,从官网https://<em>jenkins</em>.io/zh/download/下载Red Had/Fedora/CentOS版本的<em>Jenkins</em>,这里以<em>jenkins</em>-2.183-1.1.noarch.rpm为例。 </div>                    </a>                  </div>                </div>              </div>
<div class="recommend-item-box type_download clearfix" data-url="http://download.csdn.net/download/prince_jun/9426473" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.6&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-6.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;6&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;http://download.csdn.net/download/prince_jun/9426473&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="http://download.csdn.net/download/prince_jun/9426473" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.6&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-6.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;6&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;http://download.csdn.net/download/prince_jun/9426473&quot;}" data-report-query="spm=1001.2101.3001.6650.6&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-6.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-6.no_search_link">
					<div class="left ellipsis-online ellipsis-online-1">python 写的一个json转csv文件的脚本</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">02-03</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="http://download.csdn.net/download/prince_jun/9426473" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.6&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-6.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;6&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;http://download.csdn.net/download/prince_jun/9426473&quot;}" data-report-query="spm=1001.2101.3001.6650.6&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-6.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-6.no_search_link">
				<div class="desc ellipsis-online ellipsis-online-1">用python 写的一个json转csv文件的脚本，csv 文件的分隔符用的 '|' ，hard code 到代码里了。
使用方法：
1. 直接执行 python json2csv.py （待转换文件hard code 到代码里）
2. 转换完后先打开excel ，然后从excel 里面找到转换后文件.csv 打开(注意不能直接打开否则会有乱码)</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_download clearfix" data-url="http://download.csdn.net/download/weixin_38714761/12869914" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.7&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-7.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;7&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;http://download.csdn.net/download/weixin_38714761/12869914&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="http://download.csdn.net/download/weixin_38714761/12869914" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.7&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-7.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;7&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;http://download.csdn.net/download/weixin_38714761/12869914&quot;}" data-report-query="spm=1001.2101.3001.6650.7&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-7.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-7.no_search_link">
					<div class="left ellipsis-online ellipsis-online-1">利用python将json数据转换为csv格式的方法</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">09-20</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="http://download.csdn.net/download/weixin_38714761/12869914" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.7&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-7.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;7&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;http://download.csdn.net/download/weixin_38714761/12869914&quot;}" data-report-query="spm=1001.2101.3001.6650.7&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-7.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-7.no_search_link">
				<div class="desc ellipsis-online ellipsis-online-1">下面小编就为大家分享一篇利用python将json数据转换为csv格式的方法，具有很好的参考价值，希望对大家有所帮助。一起跟随小编过来看看吧</div>
			</a>
		</div>
	</div>
</div><div class="recommend-item-box baiduSearch clearfix" data-type="blog" data-report-view="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-12.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;,\&quot;parent_index\&quot;:\&quot;7\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.7&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_19239339/article/details/80829315&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_title~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;12&quot;}">	                <div class="content-box">		                <div class="content-blog display-flex">			                  <div class="title-box">				                  <a class="tit" href="https://blog.csdn.net/qq_19239339/article/details/80829315" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-12.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;,\&quot;parent_index\&quot;:\&quot;7\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.7&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_19239339/article/details/80829315&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_title~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;12&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-12.no_search_link&amp;spm=1001.2101.3001.4242.7">					                <div class="left ellipsis-online ellipsis-online-1">基于<em>jenkins</em><em>持续集成</em><em>环境</em>的构建_软件测试</div>				                  </a>			                  </div>                    <div class="info-box display-flex">                      <div class="info display-flex">                        <span class="info-block">9-3</span>                      </div>                    </div>                  </div>                  <div class="desc-box">                    <a href="https://blog.csdn.net/qq_19239339/article/details/80829315" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-12.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;,\&quot;parent_index\&quot;:\&quot;7\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.7&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_19239339/article/details/80829315&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_title~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;12&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-12.no_search_link&amp;spm=1001.2101.3001.4242.7">                      <div class="desc ellipsis-online ellipsis-online-1">1、对外提供<em>Jenkins</em>WEB服务,可以给管理人员登录查看和新增构建任务等工作; 2、<em>Jenkins</em> 依赖的构建软件部署、例如GIT/MAVEN 软件资源 Jdk1.8 下载JDk1.8软件安装主要为tomcat运行提供运行<em>环境</em>支撑。 </div>                    </a>                  </div>                </div>              </div><div class="recommend-item-box baiduSearch clearfix" data-type="blog">	                <div class="content-box">		                <div class="content-blog display-flex">			                  <div class="title-box">				                  <a class="tit" href="https://blog.csdn.net/shenlei19911210/article/details/60128323" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-13.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;,\&quot;parent_index\&quot;:\&quot;7\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.8&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/shenlei19911210/article/details/60128323&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_title~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;13&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-13.no_search_link&amp;spm=1001.2101.3001.4242.8">					                <div class="left ellipsis-online ellipsis-online-1">使用<em>Jenkins</em>搭建<em>持续集成</em><em>环境</em>_不断成长的我</div>				                  </a>			                  </div>                    <div class="info-box display-flex">                      <div class="info display-flex">                        <span class="info-block">8-26</span>                      </div>                    </div>                  </div>                  <div class="desc-box">                    <a href="https://blog.csdn.net/shenlei19911210/article/details/60128323" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-13.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;,\&quot;parent_index\&quot;:\&quot;7\&quot;}&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4242.8&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/shenlei19911210/article/details/60128323&quot;,&quot;strategy&quot;:&quot;2~default~baidujs_title~default&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;index&quot;:&quot;13&quot;}" data-report-query="utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-13.no_search_link&amp;spm=1001.2101.3001.4242.8">                      <div class="desc ellipsis-online ellipsis-online-1">使用<em>Jenkins</em>搭建<em>持续集成</em><em>环境</em> 准备工作 安装JDK (具体安装流程这里不进行展开讨论) 从<em>Jenkins</em>官方网站https://<em>jenkins</em>.io下载最新的war包。(虽然<em>Jenkins</em>提供了Windows、Linux、OS X等平台的安装包,但是,墙裂推荐使用war包) ...</div>                    </a>                  </div>                </div>              </div>
<div class="recommend-item-box type_download clearfix" data-url="http://download.csdn.net/download/weixin_41290949/12151457">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="http://download.csdn.net/download/weixin_41290949/12151457" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.8&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-8.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;8&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;http://download.csdn.net/download/weixin_41290949/12151457&quot;}" data-report-query="spm=1001.2101.3001.6650.8&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-8.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-8.no_search_link">
					<div class="left ellipsis-online ellipsis-online-1">JavaScript将csv转为json标准的.csv文件模版</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">02-12</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="http://download.csdn.net/download/weixin_41290949/12151457" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.8&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-8.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;8&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;http://download.csdn.net/download/weixin_41290949/12151457&quot;}" data-report-query="spm=1001.2101.3001.6650.8&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-8.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-8.no_search_link">
				<div class="desc ellipsis-online ellipsis-online-1">CSV是Comma Separated Values的缩写，一种常用的数据存储文件格式，其中每一行是一条记录，每一条记录包含很多列，每列中的数据通常使用逗号分隔，当其中的值包含逗号时需要使用单引号或双引号包含。 </div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_download clearfix" data-url="http://download.csdn.net/download/weixin_39841882/11515651">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="http://download.csdn.net/download/weixin_39841882/11515651" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.9&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-9.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;9&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;http://download.csdn.net/download/weixin_39841882/11515651&quot;}" data-report-query="spm=1001.2101.3001.6650.9&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-9.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-9.no_search_link">
					<div class="left ellipsis-online ellipsis-online-1">Python-json2csv实现将jsoncsv文件转换工具</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">08-10</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="http://download.csdn.net/download/weixin_39841882/11515651" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.9&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-9.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;9&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;http://download.csdn.net/download/weixin_39841882/11515651&quot;}" data-report-query="spm=1001.2101.3001.6650.9&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-9.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-9.no_search_link">
				<div class="desc ellipsis-online ellipsis-online-1">json2csv：实现将json-&gt;csv文件转换工具</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_download clearfix" data-url="https://download.csdn.net/download/weixin_38641111/15438557">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://download.csdn.net/download/weixin_38641111/15438557" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.10&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-10.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;10&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/weixin_38641111/15438557&quot;}" data-report-query="spm=1001.2101.3001.6650.10&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-10.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-10.no_search_link">
					<div class="left ellipsis-online ellipsis-online-1"><em>jenkins</em>+Git搭建<em>持续集成</em><em>环境</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">02-24</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://download.csdn.net/download/weixin_38641111/15438557" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.10&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~default-10.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;10&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~default&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/weixin_38641111/15438557&quot;}" data-report-query="spm=1001.2101.3001.6650.10&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-10.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-10.no_search_link">
				<div class="desc ellipsis-online ellipsis-online-1"><em>持续集成</em>通过自动化构建、自动化测试以及自动化部署加上较高的<em>集成</em>频率保证了开发系统中的问题能迅速被发现和修复，降低了<em>集成</em>失败的风险，使得系统在开发中始终保持在一个稳定健康的<em>集成</em>状态。<em>jenkins</em>是目前广泛应用的<em>持续集成</em>工具，本文记录我使用<em>jenkins</em>+Git配置<em>持续集成</em><em>环境</em>的整个流程以及踩到的坑（<em>jenkins</em>过程的坑往往不是在第一次配置，而是在配置结束后更改某些配置项的时候踩到）。总体流程如下：tomcat8.0下载地址：http://tomcat.apache.org/<em>jenkins</em>下载地址：http://<em>jenkins</em>-ci.org/下载完毕后，将<em>jenkins</em>.war丢入tomcat</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/hancoder/article/details/107612802">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/hancoder/article/details/107612802" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.11&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BLOGCOLUMN~default-11.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;11&quot;,&quot;strategy&quot;:&quot;2~default~BLOGCOLUMN~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/details/107612802&quot;}" data-report-query="spm=1001.2101.3001.6650.11&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBLOGCOLUMN%7Edefault-11.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBLOGCOLUMN%7Edefault-11.no_search_link">
					<div class="left ellipsis-online ellipsis-online-1"><em>【</em>谷粒商城<em>】</em>k8s、devops集群篇(4/4)</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/hancoder" target="_blank"><span class="blog-title">努力充实，远方可期</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">07-27</span>
					<span class="info-block read"><img class="read-img" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/readCountWhite.png" alt="">
					2万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/hancoder/article/details/107612802" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.11&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BLOGCOLUMN~default-11.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;11&quot;,&quot;strategy&quot;:&quot;2~default~BLOGCOLUMN~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/details/107612802&quot;}" data-report-query="spm=1001.2101.3001.6650.11&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBLOGCOLUMN%7Edefault-11.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBLOGCOLUMN%7Edefault-11.no_search_link">
				<div class="desc ellipsis-online ellipsis-online-1">1、K8s快速入门
1）简介
kubernetes简称k8s。是用于自动部署，扩展和管理容器化应用程序的开源系统。
中文官网：https://kubernetes.io/Zh/
中文社区：https://www.kubernetes.org.cn/
官方文档：https://kubernetes.io/zh/docs/home/
社区文档：https://docs.kubernetes.org.cn/
部署方式的进化：



2）架构
（1）整体主从方式


（2）master节点架构



（3）Node</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/hancoder/article/details/118053239">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/hancoder/article/details/118053239" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.12&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BLOGCOLUMN~default-12.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;12&quot;,&quot;strategy&quot;:&quot;2~default~BLOGCOLUMN~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/details/118053239&quot;}" data-report-query="spm=1001.2101.3001.6650.12&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBLOGCOLUMN%7Edefault-12.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBLOGCOLUMN%7Edefault-12.no_search_link">
					<div class="left ellipsis-online ellipsis-online-1"><em>【</em>k8s<em>】</em>2、k8s安装、kubeSphere安装与使用</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/hancoder" target="_blank"><span class="blog-title">努力充实，远方可期</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">06-19</span>
					<span class="info-block read"><img class="read-img" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/readCountWhite.png" alt="">
					454
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/hancoder/article/details/118053239" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.12&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BLOGCOLUMN~default-12.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;12&quot;,&quot;strategy&quot;:&quot;2~default~BLOGCOLUMN~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/details/118053239&quot;}" data-report-query="spm=1001.2101.3001.6650.12&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBLOGCOLUMN%7Edefault-12.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBLOGCOLUMN%7Edefault-12.no_search_link">
				<div class="desc ellipsis-online ellipsis-online-1">第二章 集群<em>环境</em>搭建
本章节主要介绍如何搭建kubernetes的集群<em>环境</em>
2.1 <em>环境</em>规划
集群类型
kubernetes集群大体上分为两类：一主多从和多主多从。

一主多从：一台Master节点和多台Node节点，搭建简单，但是有单机故障风险，适合用于测试<em>环境</em>
多主多从：多台Master节点和多台Node节点，搭建麻烦，安全性高，适合用于生产<em>环境</em>



说明：为了测试简单，本次搭建的是  一主两从   类型的集群

安装方式
kubernetes有多种部署方式，目前主流的方式有kubeadm、minik</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/hancoder/article/details/117969869">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/hancoder/article/details/117969869" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.13&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BLOGCOLUMN~default-13.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;13&quot;,&quot;strategy&quot;:&quot;2~default~BLOGCOLUMN~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/details/117969869&quot;}" data-report-query="spm=1001.2101.3001.6650.13&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBLOGCOLUMN%7Edefault-13.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBLOGCOLUMN%7Edefault-13.no_search_link">
					<div class="left ellipsis-online ellipsis-online-1"><em>【</em>k8s<em>】</em>1、介绍</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/hancoder" target="_blank"><span class="blog-title">努力充实，远方可期</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">06-16</span>
					<span class="info-block read"><img class="read-img" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/readCountWhite.png" alt="">
					418
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/hancoder/article/details/117969869" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.13&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BLOGCOLUMN~default-13.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;13&quot;,&quot;strategy&quot;:&quot;2~default~BLOGCOLUMN~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/details/117969869&quot;}" data-report-query="spm=1001.2101.3001.6650.13&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBLOGCOLUMN%7Edefault-13.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBLOGCOLUMN%7Edefault-13.no_search_link">
				<div class="desc ellipsis-online ellipsis-online-1">第一章 kubernetes介绍
本章节主要介绍应用程序在服务器上部署方式演变以及kubernetes的概念、组件和工作原理。
应用部署方式演变
在部署应用程序的方式上，主要经历了三个时代：


传统部署：互联网早期，会直接将应用程序部署在物理机上

优点：简单，不需要其它技术的参与
缺点：不能为应用程序定义资源使用边界，很难合理地分配计算资源，而且程序之间容易产生影响



虚拟化部署：可以在一台物理机上运行多个虚拟机，每个虚拟机都是独立的一个<em>环境</em>

优点：程序<em>环境</em>不会相互产生影响，提供了一定程度的安全性</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/hancoder/article/details/120619260">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/hancoder/article/details/120619260" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.14&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BLOGCOLUMN~default-14.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;14&quot;,&quot;strategy&quot;:&quot;2~default~BLOGCOLUMN~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/details/120619260&quot;}" data-report-query="spm=1001.2101.3001.6650.14&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBLOGCOLUMN%7Edefault-14.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBLOGCOLUMN%7Edefault-14.no_search_link">
					<div class="left ellipsis-online ellipsis-online-1"><em>【</em>k8s<em>】</em>docker网络模式（必知）</div>
					<div class="tag">最新发布</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/hancoder" target="_blank"><span class="blog-title">努力充实，远方可期</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">10-05</span>
					<span class="info-block read"><img class="read-img" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/readCountWhite.png" alt="">
					201
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/hancoder/article/details/120619260" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.14&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BLOGCOLUMN~default-14.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;14&quot;,&quot;strategy&quot;:&quot;2~default~BLOGCOLUMN~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/details/120619260&quot;}" data-report-query="spm=1001.2101.3001.6650.14&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBLOGCOLUMN%7Edefault-14.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBLOGCOLUMN%7Edefault-14.no_search_link">
				<div class="desc ellipsis-online ellipsis-online-1">一、docker网络基础
docker网络部分的视频我看了很多，讲解最透彻的还是https://www.bilibili.com/video/BV123411y7TB?p=8

docker的网络是基于Linux namespace虚拟化实现的。

Docker本身的技术依赖于Linux内核虚拟化技术的发展。所以Docker对Linux内核的特性有很强的依赖。本章主要介绍Docker所使用的Linux网络技术。
1 网络基础
其中Docker使用到的与Linux网络有关的技术分别有：网络名称空间、Veth、</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/lewy7/article/details/90578886">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/lewy7/article/details/90578886" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.15&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-15.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;15&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/lewy7/article/details/90578886&quot;}" data-report-query="spm=1001.2101.3001.6650.15&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-15.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-15.no_search_link">
					<div class="left ellipsis-online ellipsis-online-1">systemctl自启</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/lewy7" target="_blank"><span class="blog-title">晴转暴雨</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">05-26</span>
					<span class="info-block read"><img class="read-img" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/readCountWhite.png" alt="">
					490
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/lewy7/article/details/90578886" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.15&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-15.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;15&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/lewy7/article/details/90578886&quot;}" data-report-query="spm=1001.2101.3001.6650.15&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-15.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-15.no_search_link">
				<div class="desc ellipsis-online ellipsis-online-1">#cd /usr/lib/systemd/system/xxx.service
=================================================
[Unit]
Description=mysql
#Wants=依赖起他unit,弱依赖，如果是Requires，强依赖
#放在该服务启动后启动，如果是Before，则是之前
After=network-online.t...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://liuhuaqiang.blog.csdn.net/article/details/51918761">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://liuhuaqiang.blog.csdn.net/article/details/51918761" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.16&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-16.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;16&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://liuhuaqiang.blog.csdn.net/article/details/51918761&quot;}" data-report-query="spm=1001.2101.3001.6650.16&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-16.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-16.no_search_link">
					<div class="left ellipsis-online ellipsis-online-1">CentOS7 下配置Keepalived为系统服务，开机自动启动。</div>
					<div class="tag">热门推荐</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/nimasike" target="_blank"><span class="blog-title">大新博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">07-15</span>
					<span class="info-block read"><img class="read-img" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/readCountWhite.png" alt="">
					3万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://liuhuaqiang.blog.csdn.net/article/details/51918761" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.16&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-16.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;16&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://liuhuaqiang.blog.csdn.net/article/details/51918761&quot;}" data-report-query="spm=1001.2101.3001.6650.16&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-16.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-16.no_search_link">
				<div class="desc ellipsis-online ellipsis-online-1">keepalived的安装以及基本配置


1.我的keepalived 安装在&nbsp;/home/wangpl/mine/soft/keepalived-1.2.2目录下。
cd  /home/wangpl/mine/soft/keepalived-1.2.2
ls -l
drwxr-xr-x. 2 root root 20 7月 &nbsp; 8 15:10 bin
drwxr-xr-x. 5 r</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/a1058926697/article/details/105246369">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/a1058926697/article/details/105246369" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.17&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-17.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;17&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/a1058926697/article/details/105246369&quot;}" data-report-query="spm=1001.2101.3001.6650.17&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-17.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-17.no_search_link">
					<div class="left ellipsis-online ellipsis-online-1">systemctl添加服务启动</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/a1058926697" target="_blank"><span class="blog-title">a1058926697的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">04-01</span>
					<span class="info-block read"><img class="read-img" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/readCountWhite.png" alt="">
					2054
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/a1058926697/article/details/105246369" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.17&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-17.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;17&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/a1058926697/article/details/105246369&quot;}" data-report-query="spm=1001.2101.3001.6650.17&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-17.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-17.no_search_link">
				<div class="desc ellipsis-online ellipsis-online-1">systemctl添加服务启动

CentOS7使用systemctl添加服务启动

CentOS7继承了RHEL 7的新的特性，例如强大的systemctl，而systemctl的使用也使得以往系统服务的/etc/init.d的启动脚本的方式就此改变，也大幅提高了系统服务的运行效率。但服务的配置和以往也发生了极大的不同，说实在的，变的简单而易用了许多。

CentOS 7的服务systemc...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/yushi6310/article/details/81915677">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/yushi6310/article/details/81915677" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.18&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-18.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;18&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/yushi6310/article/details/81915677&quot;}" data-report-query="spm=1001.2101.3001.6650.18&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-18.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-18.no_search_link">
					<div class="left ellipsis-online ellipsis-online-1">linux 7 自定义systemctl服务启动卡住，查询状态显示Active: activating (start) since Tue 2018-08-21 21:59:11 CST; 39s a</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/yushi6310" target="_blank"><span class="blog-title">yushi6310的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">08-21</span>
					<span class="info-block read"><img class="read-img" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/readCountWhite.png" alt="">
					1万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/yushi6310/article/details/81915677" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.18&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-18.no_search_link\&quot;,\&quot;dist_request_id\&quot;:\&quot;1635572142975_11827\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1635572142975_11827&quot;,&quot;ab_strategy&quot;:&quot;ctrlist&quot;,&quot;index&quot;:&quot;18&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~default&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/yushi6310/article/details/81915677&quot;}" data-report-query="spm=1001.2101.3001.6650.18&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-18.no_search_link&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-18.no_search_link">
				<div class="desc ellipsis-online ellipsis-online-1">编写自定义systemctl脚本启动进程，卡顿了



查询进程状态时，显示



[root@VM67-redhat7 sfy]# systemctl status simple
● simple.service - sfy test
   Loaded: loaded (/usr/lib/systemd/system/simple.service; disabled; vendor prese...</div>
			</a>
		</div>
	</div>
</div>
            </div>
            <div class="template-box">
                <span>©️2021 CSDN</span>
                <span>皮肤主题: 撸撸猫</span>
                <span> 设计师:马嘣嘣</span>
                <span>
                    <a href="https://blog.csdn.net/" class="back-home c-blue c-blue-hover c-blue-focus">返回首页</a>
                </span>
            </div>
<div class="blog-footer-bottom" style="margin-top:10px;">
        <div id="copyright-box" class="">
          <div id="csdn-copyright-footer" class="column small">
            <ul class="footer-column-t">
            <li>
              <a href="https://www.csdn.net/company/index.html#about" target="_blank">关于我们</a>
            </li>
            <li>
              <a href="https://www.csdn.net/company/index.html#recruit" target="_blank">招贤纳士</a>
            </li>
            <li>
              <a href="https://www.csdn.net/company/index.html#advertisement" target="_blank">广告服务</a>
            </li>
            <li>
              <a href="https://plugin.csdn.net/" target="_blank">开发助手</a>
            </li>
            <li>
              <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/tel.png" alt="">
              <span>400-660-0108</span>
            </li>
            <li>
              <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/email.png" alt="">
              <a href="mailto:webmaster@csdn.net" target="_blank">kefu@csdn.net</a>
            </li>
            <li>
              <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/cs.png" alt="">
              <a href="https://csdn.s2.udesk.cn/im_client/?web_plugin_id=29181" target="_blank">在线客服</a>
            </li>
            <li>
              工作时间&nbsp;8:30-22:00
            </li>
          </ul>
            <ul class="footer-column-b">
            <li><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/badge.png" alt=""><a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010502030143" rel="noreferrer" target="_blank">公安备案号11010502030143</a></li>
            <li><a href="http://beian.miit.gov.cn/publish/query/indexFirst.action" rel="noreferrer" target="_blank">京ICP备19004658号</a></li>
            <li><a href="https://csdnimg.cn/release/live_fe/culture_license.png" rel="noreferrer" target="_blank">京网文〔2020〕1039-165号</a></li>
            <li><a href="https://csdnimg.cn/cdn/content-toolbar/csdn-ICP.png" target="_blank">经营性网站备案信息</a></li>
            <li><a href="http://www.bjjubao.org/" target="_blank">北京互联网违法和不良信息举报中心</a></li>
            <li><a href="http://www.cyberpolice.cn/" target="_blank">网络110报警服务</a></li>
            <li><a href="http://www.12377.cn/" target="_blank">中国互联网举报中心</a></li>
            <li><a href="https://download.csdn.net/index.php/tutelage/" target="_blank">家长监护</a></li>
            <li><a href="https://chrome.google.com/webstore/detail/csdn%E5%BC%80%E5%8F%91%E8%80%85%E5%8A%A9%E6%89%8B/kfkdboecolemdjodhmhmcibjocfopejo?hl=zh-CN" target="_blank">Chrome商店下载</a></li>
            <li>©1999-2021北京创新乐知网络技术有限公司</li>
            <li><a href="https://www.csdn.net/company/index.html#statement" target="_blank">版权与免责声明</a></li>
            <li><a href="https://blog.csdn.net/blogdevteam/article/details/90369522" target="_blank">版权申诉</a></li>
            <li><a href="https://img-home.csdnimg.cn/images/20210414021151.jpg" target="_blank">出版物许可证</a></li>
            <li><a href="https://img-home.csdnimg.cn/images/20210414021142.jpg" target="_blank">营业执照</a></li>
          </ul>
          </div>
        </div>
      </div>
<script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/csdn-footer.js" data-isfootertrack="false" type="text/javascript"></script>
<script type="text/javascript">
    window.csdn.csdnFooter.options = {
        el: '.blog-footer-bottom',
        type: 2
    }
</script>        </main>
<aside class="blog_container_aside" style="position: fixed; bottom: 0px; z-index: 99; left: 119.5px; width: 300px; top: auto;">
	<div id="asideProfile" class="aside-box">
    <div class="profile-intro d-flex">
        <div class="avatar-box d-flex justify-content-center flex-column">
            <a href="https://blog.csdn.net/hancoder" data-report-click="{&quot;mod&quot;:&quot;popu_379&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4121&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder&quot;,&quot;ab&quot;:&quot;new&quot;}">
                <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/3_hancoder" class="avatar_pic">
            </a>
        </div>
        <div class="user-info d-flex flex-column profile-intro-name-box">
            <div class="profile-intro-name-boxTop">
                <a href="https://blog.csdn.net/hancoder" class="" id="uid" title="hancoder" data-report-click="{&quot;mod&quot;:&quot;popu_379&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4122&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <span class="name " username="hancoder">hancoder</span>
                </a>
                <span>
                </span>
                <span class="flag expert-blog">
                <span class="bubble">CSDN认证博客专家</span>
                </span>
                <span class="flag company-blog">
                <span class="bubble">CSDN认证企业博客</span>
                </span>
            </div>
            <div class="profile-intro-name-boxFooter">
                <span class="personal-home-page personal-home-years">码龄4年</span>
                    <span class="personal-home-page">
                    <a class="personal-home-certification" href="https://i.csdn.net/#/uc/profile?utm_source=14998968" target="_blank" title="高校学生">
                    <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/colleges.png" alt="">
                    高校学生
                    </a>
                    </span>
            </div>
        </div>
    </div>
    <div class="data-info d-flex item-tiling">
        <dl class="text-center" title="163">
            <a href="https://blog.csdn.net/hancoder" data-report-click="{&quot;mod&quot;:&quot;1598321000_001&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4310&quot;}" data-report-query="t=1">  
                <dt><span class="count">163</span></dt>
                <dd class="font">原创</dd>
            </a>
        </dl>
        <dl class="text-center" data-report-click="{&quot;mod&quot;:&quot;1598321000_002&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4311&quot;}" title="5627">
            <a href="https://blog.csdn.net/rank/list/weekly" target="_blank">
                <dt><span class="count">5627</span></dt>
                <dd class="font">周排名</dd>
            </a>
        </dl>
        <dl class="text-center" title="3379">
            <a href="https://blog.csdn.net/rank/list/total" data-report-click="{&quot;mod&quot;:&quot;1598321000_003&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4312&quot;}" target="_blank">
                <dt><span class="count">3379</span></dt>
                <dd class="font">总排名</dd>
            </a>
        </dl>
        <dl class="text-center" style="min-width:58px" title="577364">  
            <dt><span class="count">57万+</span></dt>
            <dd>访问</dd>
        </dl>
        <dl class="text-center" title="6级,点击查看等级说明">
            <dt><a href="https://blog.csdn.net/blogdevteam/article/details/103478461" target="_blank">
                <img class="level" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/blog6.png">
            </a>
            </dt>
            <dd>等级</dd>
        </dl>
    </div>
    <div class="item-rank"></div>
    <div class="data-info d-flex item-tiling">
        <dl class="text-center" title="5789">
            <dt><span class="count">5789</span></dt>
            <dd>积分</dd>
        </dl>
         <dl class="text-center" id="fanBox" title="2301">
            <dt><span class="count" id="fan">2301</span></dt>
            <dd>粉丝</dd>
        </dl>
        <dl class="text-center" title="1381">
            <dt><span class="count">1381</span></dt>
            <dd>获赞</dd>
        </dl>
        <dl class="text-center" title="465">
            <dt><span class="count">465</span></dt>
            <dd>评论</dd>
        </dl>
        <dl class="text-center" title="3813">
            <dt><span class="count">3813</span></dt>
            <dd>收藏</dd>
        </dl>
    </div>
    <div class="aside-box-footer">
        <div class="badge-box d-flex">
            <div class="badge d-flex">
                <div class="icon-badge" title="GitHub">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click="{&quot;spm&quot;:&quot;3001.4296&quot;}" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/github@240.png" alt="GitHub">
                    </div>
                </div>
                <div class="icon-badge" title="脉脉勋章">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click="{&quot;spm&quot;:&quot;3001.4296&quot;}" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/maimai@240.png" alt="脉脉勋章">
                    </div>
                </div>
                <div class="icon-badge" title="签到新秀">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click="{&quot;spm&quot;:&quot;3001.4296&quot;}" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/qiandao1@240.png" alt="签到新秀">
                    </div>
                </div>
                <div class="icon-badge" title="阅读者勋章Lv3">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click="{&quot;spm&quot;:&quot;3001.4296&quot;}" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/yuedu30@240.png" alt="阅读者勋章Lv3">
                    </div>
                </div>
                <div class="icon-badge" title="持之以恒">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click="{&quot;spm&quot;:&quot;3001.4296&quot;}" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/chizhiyiheng@240.png" alt="持之以恒">
                    </div>
                </div>
                <div class="icon-badge" title="勤写标兵Lv4">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click="{&quot;spm&quot;:&quot;3001.4296&quot;}" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/qixiebiaobing4@240.png" alt="勤写标兵Lv4">
                    </div>
                </div>
                <div class="icon-badge" title="分享精英">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click="{&quot;spm&quot;:&quot;3001.4296&quot;}" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/fenxiangjingying@240.png" alt="分享精英">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="profile-intro-name-boxOpration">
        <div class="opt-letter-watch-box">
        <a class="bt-button personal-letter" href="https://im.csdn.net/chat/hancoder" target="_blank" rel="noopener">私信</a>
        </div>
        <div class="opt-letter-watch-box"> 
            <a class="personal-watch bt-button" id="btnAttent">关注</a>  
        </div>
    </div>
</div>
<div id="asideSearchArticle" class="aside-box">
	<div class="aside-content search-comter">
    <div class="aside-search aside-search-blog">         
        <input type="text" class="input-serch-blog" name="" autocomplete="off" value="" id="search-blog-words" placeholder="搜博主文章">
        <a class="btn-search-blog">
                    <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/csdn-sou.png">
        </a>
    </div>
    </div>
</div>


<div id="asideHotArticle" class="aside-box">
	<h3 class="aside-title">热门文章</h3>
	<div class="aside-content">
		<ul class="hotArticle-list">
			<li>
				<a href="https://blog.csdn.net/hancoder/article/details/106922139" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_541&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4139&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/details/106922139&quot;,&quot;ab&quot;:&quot;new&quot;}">
				谷粒商城笔记-新手级教程(1/4)
					<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/readCountWhite.png" alt="">
					<span class="read">201404</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/hancoder/article/details/107612619" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_541&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4139&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/details/107612619&quot;,&quot;ab&quot;:&quot;new&quot;}">
				谷粒商城笔记-基础篇-2(2/4)
					<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/readCountWhite.png" alt="">
					<span class="read">68545</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/hancoder/article/details/107612746" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_541&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4139&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/details/107612746&quot;,&quot;ab&quot;:&quot;new&quot;}">
				【谷粒商城】框架扩充篇(3/4)
					<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/readCountWhite.png" alt="">
					<span class="read">43714</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/hancoder/article/details/107612802" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_541&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4139&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/details/107612802&quot;,&quot;ab&quot;:&quot;new&quot;}">
				【谷粒商城】k8s、devops集群篇(4/4)
					<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/readCountWhite.png" alt="">
					<span class="read">25261</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/hancoder/article/details/113922398" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_541&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4139&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/details/113922398&quot;,&quot;ab&quot;:&quot;new&quot;}">
				【谷粒商城】ElasticSearch、上架与检索
					<img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/readCountWhite.png" alt="">
					<span class="read">22643</span>
                </a>
			</li>
		</ul>
	</div>
</div>
<div id="asideCategory" class="aside-box flexible-box">
    <h3 class="aside-title">分类专栏</h3>
    <div class="aside-content">
        <ul>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_9577339.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_9577339.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/202103190233257.jpg" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        <span class="text">Spring</span>
                    </span>
                    <span class="count float-right">32篇</span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_10344227.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_10344227.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210924010505854.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        <span class="text">网络通信与OS</span>
                    </span>
                    <span class="count float-right">6篇</span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_10184847.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_10184847.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210319023443547.jpg" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        <span class="text">源码解读</span>
                    </span>
                    <span class="count float-right">21篇</span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_10274700.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_10274700.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/2021092401070377.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        <span class="text">多线程</span>
                    </span>
                    <span class="count float-right">8篇</span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_11140481.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_11140481.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210704200028250(1).png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        <span class="text">k8s</span>
                    </span>
                    <span class="count float-right">13篇</span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_10822407.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_10822407.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210319023137910.jpg" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        <span class="text">谷粒项目笔记</span>
                    </span>
                    <span class="count float-right">13篇</span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_11180472.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_11180472.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210704195812350.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        <span class="text">Tomcat源码</span>
                    </span>
                    <span class="count float-right">7篇</span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_10345348.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_10345348.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210319023536204.jpg" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        <span class="text">JVM</span>
                    </span>
                    <span class="count float-right">5篇</span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_9488515.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_9488515.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210319023640626.jpg" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        <span class="text">数据库</span>
                    </span>
                    <span class="count float-right">16篇</span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_11133829.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_11133829.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20201014180756928.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        <span class="text">java框架</span>
                    </span>
                    <span class="count float-right">3篇</span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_9494308.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_9494308.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20201014180756923.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        <span class="text">linux与服务器</span>
                    </span>
                    <span class="count float-right">11篇</span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_9394898.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_9394898.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20201014180756738.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        <span class="text">Java</span>
                    </span>
                    <span class="count float-right">23篇</span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_9490100.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_9490100.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20201014180756922.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        <span class="text">mybatis</span>
                    </span>
                    <span class="count float-right">12篇</span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_10106944.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_10106944.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20201014180756925.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        <span class="text">MVC</span>
                    </span>
                    <span class="count float-right">11篇</span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_10382538.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_10382538.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20201014180756738.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        <span class="text">大数据框架</span>
                    </span>
                    <span class="count float-right">2篇</span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_10147715.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_10147715.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20201014180756780.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        <span class="text">分布式</span>
                    </span>
                    <span class="count float-right">5篇</span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_10267240.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_10267240.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20201014180756922.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        <span class="text">数据结构与刷题</span>
                    </span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_7772521.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_7772521.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20201014180756928.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        <span class="text">C++</span>
                    </span>
                    <span class="count float-right">11篇</span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_8697621.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_8697621.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20201014180756928.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        <span class="text">深度学习</span>
                    </span>
                    <span class="count float-right">5篇</span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_8824374.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_8824374.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20201014180756913.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        <span class="text">python</span>
                    </span>
                    <span class="count float-right">3篇</span>
                </a>
            </li>
        </ul>
    </div>
    <p class="text-center">
        <a class="flexible-btn" data-fbox="aside-archive"><img class="look-more" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/arrowDownWhite.png" alt=""></a>
    </p>
</div>
<div id="asideNewComments" class="aside-box">
    <h3 class="aside-title">最新评论</h3>
    <div class="aside-content">
        <ul class="newcomment-list">
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/hancoder/article/details/106922139#comments_18775924" data-report-click="{&quot;mod&quot;:&quot;popu_542&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4231&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/details/106922139#comments_18775924&quot;,&quot;ab&quot;:&quot;new&quot;}">谷粒商城笔记-新手级教程(1/4)</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/hancoder" class="user-name" target="_blank">hancoder: </a>
                    <span class="code-comments">把mysql的conf和data拿出来放到宿主机上，这样docker重启后数据还在。在K8s中是用PV和PVC来管理mysql数据的，一个道理</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/hancoder/article/details/106922139#comments_18775472" data-report-click="{&quot;mod&quot;:&quot;popu_542&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4231&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/details/106922139#comments_18775472&quot;,&quot;ab&quot;:&quot;new&quot;}">谷粒商城笔记-新手级教程(1/4)</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/qq_31306441" class="user-name" target="_blank">受访市民廖先生: </a>
                    <span class="code-comments">请问为什么docker安装mysql需要挂载呢</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/hancoder/article/details/118233786#comments_18768282" data-report-click="{&quot;mod&quot;:&quot;popu_542&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4231&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/details/118233786#comments_18768282&quot;,&quot;ab&quot;:&quot;new&quot;}">【Jenkins】持续集成环境实战</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/xiten" class="user-name" target="_blank">xiao_teng_: </a>
                    <span class="code-comments">老哥，跟着黑马写的嘛，多谢啦</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/hancoder/article/details/106922139#comments_18760816" data-report-click="{&quot;mod&quot;:&quot;popu_542&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4231&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/details/106922139#comments_18760816&quot;,&quot;ab&quot;:&quot;new&quot;}">谷粒商城笔记-新手级教程(1/4)</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/MyNine_" class="user-name" target="_blank">TakeMyHandNow: </a>
                    <span class="code-comments">发布保存商品信息的时候，feign远程调用读超时了，这个怎么解决哇？</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/hancoder/article/details/106922139#comments_18760762" data-report-click="{&quot;mod&quot;:&quot;popu_542&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4231&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/details/106922139#comments_18760762&quot;,&quot;ab&quot;:&quot;new&quot;}">谷粒商城笔记-新手级教程(1/4)</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/MyNine_" class="user-name" target="_blank">TakeMyHandNow: </a>
                    <span class="code-comments">virtualBox可以设置默认镜像存放位置的，可以更改下不用放到c盘</span>
                </p>
            </li>
        </ul>
    </div>
</div>
<div id="asideNewNps" class="aside-box" style="display: block;">
    <h3 class="aside-title">您愿意向朋友推荐“博客详情页”吗？</h3>
    <div class="aside-content">
        <ul class="newnps-list">
            <li class="newnps-item" data-type="强烈不推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/npsFeel1.png" alt="">
                    <img class="newnps-img default" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/npsFeelGrey1.png" alt="">
                </div>
                <div class="newnps-text">强烈不推荐</div>
            </li>
            <li class="newnps-item" data-type="不推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/npsFeel2.png" alt="">
                    <img class="newnps-img default" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/npsFeelGrey2.png" alt="">
                </div>
                <div class="newnps-text">不推荐</div>
            </li>
            <li class="newnps-item" data-type="一般般">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/npsFeel3.png" alt="">
                    <img class="newnps-img default" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/npsFeelGrey3.png" alt="">
                </div>
                <div class="newnps-text">一般般</div>
            </li>
            <li class="newnps-item" data-type="推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/npsFeel4.png" alt="">
                    <img class="newnps-img default" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/npsFeelGrey4.png" alt="">
                </div>
                <div class="newnps-text">推荐</div>
            </li>
            <li class="newnps-item" data-type="强烈推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/npsFeel5.png" alt="">
                    <img class="newnps-img default" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/npsFeelGrey5.png" alt="">
                </div>
                <div class="newnps-text">强烈推荐</div>
            </li>
        </ul>
        <div class="newnps-form-box">
        <div class="newnps-form">
            <input type="text" placeholder="请输入建议或反馈后点击提交" class="newnps-input">
            <span class="newnps-btn">提交</span>
        </div>
        </div>
    </div>
</div>
<div id="asideArchive" class="aside-box" style="display:block!important; width:300px;">
    <h3 class="aside-title">最新文章</h3>
    <div class="aside-content">
        <ul class="inf_list clearfix">
            <li class="clearfix">
            <a href="https://blog.csdn.net/hancoder/article/details/120954315" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_382&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4136&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/details/120954315&quot;,&quot;ab&quot;:&quot;new&quot;}">【AQS源码】condition、CountDownLatch、CyclicBarrier、中断、共享等</a>
            </li>
            <li class="clearfix">
            <a href="https://blog.csdn.net/hancoder/article/details/120748968" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_382&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4136&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/details/120748968&quot;,&quot;ab&quot;:&quot;new&quot;}">【git】原理与.git文件夹解读</a>
            </li>
            <li class="clearfix">
            <a href="https://blog.csdn.net/hancoder/article/details/120704276" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_382&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4136&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/details/120704276&quot;,&quot;ab&quot;:&quot;new&quot;}">【谷粒商城】k8s与DevOps最终章</a>
            </li>
        </ul>
        <div class="archive-bar"></div>
        <div class="archive-box">
                <div class="archive-title">2021</div> 
                <div class="archive-content">
                    <div class="archive-item">
                        <a href="https://blog.csdn.net/hancoder/article/month/2021/10" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_538&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4138&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/month/2021/10&quot;}">
                        <span class="time">10月</span>
                        <span class="count">5篇</span>
                        </a>
                    </div>
                    <div class="archive-item">
                        <a href="https://blog.csdn.net/hancoder/article/month/2021/09" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_538&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4138&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/month/2021/09&quot;}">
                        <span class="time">09月</span>
                        <span class="count">5篇</span>
                        </a>
                    </div>
                    <div class="archive-item">
                        <a href="https://blog.csdn.net/hancoder/article/month/2021/07" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_538&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4138&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/month/2021/07&quot;}">
                        <span class="time">07月</span>
                        <span class="count">2篇</span>
                        </a>
                    </div>
                    <div class="archive-item">
                        <a href="https://blog.csdn.net/hancoder/article/month/2021/06" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_538&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4138&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/month/2021/06&quot;}">
                        <span class="time">06月</span>
                        <span class="count">15篇</span>
                        </a>
                    </div>
                    <div class="archive-item">
                        <a href="https://blog.csdn.net/hancoder/article/month/2021/03" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_538&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4138&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/month/2021/03&quot;}">
                        <span class="time">03月</span>
                        <span class="count">2篇</span>
                        </a>
                    </div>
                    <div class="archive-item">
                        <a href="https://blog.csdn.net/hancoder/article/month/2021/02" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_538&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4138&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/month/2021/02&quot;}">
                        <span class="time">02月</span>
                        <span class="count">10篇</span>
                        </a>
                    </div>
                    <div class="archive-item">
                        <a href="https://blog.csdn.net/hancoder/article/month/2021/01" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_538&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4138&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/article/month/2021/01&quot;}">
                        <span class="time">01月</span>
                        <span class="count">7篇</span>
                        </a>
                    </div>
                </div>
                <div class="archive-list-item"><a href="https://blog.csdn.net/hancoder/article/month/2020/12" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_538&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4138&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;dest&quot;:&quot;&quot;}"><span class="year">2020年</span><span class="num">72篇</span></a></div>
                <div class="archive-list-item"><a href="https://blog.csdn.net/hancoder/article/month/2019/12" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_538&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4138&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;dest&quot;:&quot;&quot;}"><span class="year">2019年</span><span class="num">51篇</span></a></div>
        </div>
    </div>
</div>
	<div id="footerRightAds" class="isShowFooterAds">
		<div class="aside-box">
			<div id="kp_box_57" data-pid="57"><script async="" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/f(8).txt"></script>
<!-- PC-博客详情页-矩形-左下视窗（自适应） -->
<ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-1076724771190722" data-ad-slot="1894159733" data-ad-format="auto" data-full-width-responsive="true" data-adsbygoogle-status="done"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?p=57&amp;a=707&amp;c=0&amp;k=&amp;spm=1001.2101.3001.5001&amp;d=1&amp;t=3&amp;u=81e9d66d8de84bbdb716e1e9c81ad329" style="display: block;width: 0px;height: 0px;"></div>
		</div>
	</div>
    <!-- 详情页显示目录 -->
<!--文章目录-->
<div id="asidedirectory" class="aside-box">
    <div class="groupfile" id="directory">
        <h3 class="aside-title">目录</h3>
        <div class="align-items-stretch group_item">
            <div class="pos-box">
            <div class="scroll-box">
                <div class="toc-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t0">一、持续集成及Jenkins介绍</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t1">软件开发生命周期</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t2">软件开发瀑布模型</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t3">软件的敏捷开发</a></li><li class="sub-box"><ol><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t4">什么是敏捷开发？</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t5">何为迭代开发？</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t6">=何为增量开发？</a></li><li class="active"><a href="https://blog.csdn.net/hancoder/article/details/118233786#t7">敏捷开发如何迭代？</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t8">敏捷开发有什么好处？</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t9">什么是持续集成</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t10">持续集成的组成要素</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t11">持续集成的好处</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t12">Jenkins介绍</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t13">二、Jenkins安装和持续集成环境配置</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t14">持续集成流程说明</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t15">服务器列表</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t16">Gitlab代码托管服务器安装</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t17">源码上传到Gitlab仓库</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t18">持续集成环境(1)-Jenkins安装</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t19">持续集成环境(2)-Jenkins插件管理</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t20">持续集成环境(3)-Jenkins用户权限管理</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t21">开启权限全局安全配置</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t22">创建角色</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t23">给用户分配角色</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t24">创建项目测试权限</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t25">持续集成环境(4)-Jenkins凭证管理</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t26">安装Credentials Binding插件</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t27">用户密码类型</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t28">SSH密钥类型</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t29">持续集成环境(5)-Maven安装和配置</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t30">持续集成环境(6)-Tomcat安装和配置</a></li><li class="sub-box"><ol><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t31">安装Tomcat8.5</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t32">配置Tomcat用户角色权限</a></li></ol></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t33">三、Jenkins构建Maven项目</a></li><li class="sub-box"><ol><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t34">Jenkins项目构建类型(1)-Jenkins构建的项目类型介绍</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t35">Jenkins项目构建类型(2)-自由风格项目构建</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t36">拉取代码</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t37">编译打包</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t38">部署</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t39">Jenkins项目构建类型(3)-Maven项目构建</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t40">Jenkins项目构建类型(4)-Pipeline流水线项目构建</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t41">Pipeline简介</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t42">安装Pipeline插件</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t43">Pipeline语法快速入门</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t44">1）Declarative声明式Pipeline</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t45">2） Scripted脚本式Pipeline</a></li></ol></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t46">Jenkins项目构建细节</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t47">1-常用的构建触发器</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t48">2-Git hook自动触发构建</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t49">3-Jenkins的参数化构建</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t50">4-配置邮箱服务器发送构建结果</a></li></ol></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t51">Jenkins+SonarQube代码审查(1) - 安装SonarQube</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t52">SonaQube简介</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t53">Jenkins+SonarQube代码审查(2) - 实现代码审查</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t54">四、Jenkins+Docker+SpringCloud微服务持续集成(上)</a></li><li class="sub-box"><ol><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t55">JK+Docker+Cloud持续集成流程说明</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t56">SpringCloud微服务源码概述</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t57">本地部署(1)-SpringCloud微服务部署</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t58">本地部署(2)-前端静态web网站</a></li></ol></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t59">环境准备(1)-Docker快速入门</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t60">Docker简介</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t61">环境准备(2)-Dockerﬁle镜像脚本快速入门</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t62">环境准备(3)-Harbor镜像仓库安装及使用</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t63">微服务持续集成(1)-项目代码上传到Gitlab</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t64">微服务持续集成(2)-从Gitlab拉取项目源码</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t65">微服务持续集成(3)-提交到SonarQube代码审查</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t66">微服务持续集成(4)-使用Dockerﬁle编译、生成镜像</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t67">微服务持续集成(5)-上传到Harbor镜像仓库</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t68">微服务持续集成(6)-拉取镜像和发布应用</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t69">微服务持续集成(7)-部署前端静态web网站</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t70">安装Nginx服务器</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t71">Jenkins安装NodeJS插件</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t72">创建前端流水线项目</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t73">5、Jenkins+Docker+SpringCloud微服务持续集成(下)</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t74">JK+Docker+Cloud部署方案优化</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t75">Jenkins+Docker+SpringCloud集群部署流程说明</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t76">完成微服务构建镜像，上传私服</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t77">完成微服务多服务器远程发布</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t78">Nginx+Zuul集群实现高可用网关</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t79">6、基于K8S构建Jenkins持续集成平台(上)</a></li><li class="sub-box"><ol><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t80">Jenkins的Master-Slave分布式构建</a></li><li class="sub-box"><ol><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t81">什么是Master-Slave分布式构建</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t82">如何实现Master-Slave分布式构建</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t83">Kubernetes实现Master-Slave分布式构建方案</a></li><li class="sub-box"><ol><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t84">传统Jenkins的Master-Slave方案的缺陷</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t85">Kubernates简介</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t86">Kubernates+Docker+Jenkins持续集成架构图</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t87">Kubernates+Docker+Jenkins持续集成方案好处</a></li></ol></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t88">Kubeadm安装Kubernetes</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t89">Kubernetes的架构</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t90">安装环境说明</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t91">设置系统参数</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t92">kube-proxy开启ipvs的前置条件</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t93">安装kubelet、kubeadm、kubectl</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t94">kubectl常用命令</a></li></ol></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t95">安装和配置NFS</a></li><li class="sub-box"><ol><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t96">NFS简介</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t97">NFS安装</a></li></ol></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t98">在Kubernetes安装Jenkins-Master</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t99">创建NFS client provisioner</a></li></ol></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t100">Jenkins与Kubernetes整合</a></li><li class="sub-box"><ol><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t101">安装Kubernetes插件</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t102">实现Jenkins与Kubernetes整合</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t103">构建Jenkins-Slave自定义镜像</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t104">测试Jenkins-Slave是否可以创建</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t105">Jenkins+Kubernetes+Docker完成微服务持续集成</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t106">拉取代码，构建镜像</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t107">微服务部署到K8S</a></li></ol></li></ol></li></ol></div>
            </div>
            </div>
        </div>
    </div>
</div>
</aside>
<script>
	$("a.flexible-btn").click(function(){
		$(this).parents('div.aside-box').removeClass('flexible-box');
		$(this).parents("p.text-center").remove();
	})
</script>
<script type="text/javascript" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/user-tooltip.js"></script>
<script type="text/javascript" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/user-medal.js"></script>    </div>
<div class="recommend-right  align-items-stretch clearfix" id="rightAside" data-type="recommend" style="height: auto !important;">
    <aside class="recommend-right_aside" style="height: auto !important;">
        <div id="recommend-right" style="position: fixed; top: 56px;">
                        <div class="flex-column aside-box groupfile" id="groupfile" style="display: block; max-height: 450px;">
                <div class="groupfile-div" style="max-height: 450px;">
                <h3 class="aside-title">目录</h3>
                <div class="align-items-stretch group_item">
                    <div class="pos-box">
                        <div class="scroll-box">
                            <div class="toc-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t0">一、持续集成及Jenkins介绍</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t1">软件开发生命周期</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t2">软件开发瀑布模型</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t3">软件的敏捷开发</a></li><li class="sub-box"><ol><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t4">什么是敏捷开发？</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t5">何为迭代开发？</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t6">=何为增量开发？</a></li><li class="active"><a href="https://blog.csdn.net/hancoder/article/details/118233786#t7">敏捷开发如何迭代？</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t8">敏捷开发有什么好处？</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t9">什么是持续集成</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t10">持续集成的组成要素</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t11">持续集成的好处</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t12">Jenkins介绍</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t13">二、Jenkins安装和持续集成环境配置</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t14">持续集成流程说明</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t15">服务器列表</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t16">Gitlab代码托管服务器安装</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t17">源码上传到Gitlab仓库</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t18">持续集成环境(1)-Jenkins安装</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t19">持续集成环境(2)-Jenkins插件管理</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t20">持续集成环境(3)-Jenkins用户权限管理</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t21">开启权限全局安全配置</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t22">创建角色</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t23">给用户分配角色</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t24">创建项目测试权限</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t25">持续集成环境(4)-Jenkins凭证管理</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t26">安装Credentials Binding插件</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t27">用户密码类型</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t28">SSH密钥类型</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t29">持续集成环境(5)-Maven安装和配置</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t30">持续集成环境(6)-Tomcat安装和配置</a></li><li class="sub-box"><ol><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t31">安装Tomcat8.5</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t32">配置Tomcat用户角色权限</a></li></ol></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t33">三、Jenkins构建Maven项目</a></li><li class="sub-box"><ol><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t34">Jenkins项目构建类型(1)-Jenkins构建的项目类型介绍</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t35">Jenkins项目构建类型(2)-自由风格项目构建</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t36">拉取代码</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t37">编译打包</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t38">部署</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t39">Jenkins项目构建类型(3)-Maven项目构建</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t40">Jenkins项目构建类型(4)-Pipeline流水线项目构建</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t41">Pipeline简介</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t42">安装Pipeline插件</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t43">Pipeline语法快速入门</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t44">1）Declarative声明式Pipeline</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t45">2） Scripted脚本式Pipeline</a></li></ol></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t46">Jenkins项目构建细节</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t47">1-常用的构建触发器</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t48">2-Git hook自动触发构建</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t49">3-Jenkins的参数化构建</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t50">4-配置邮箱服务器发送构建结果</a></li></ol></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t51">Jenkins+SonarQube代码审查(1) - 安装SonarQube</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t52">SonaQube简介</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t53">Jenkins+SonarQube代码审查(2) - 实现代码审查</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t54">四、Jenkins+Docker+SpringCloud微服务持续集成(上)</a></li><li class="sub-box"><ol><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t55">JK+Docker+Cloud持续集成流程说明</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t56">SpringCloud微服务源码概述</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t57">本地部署(1)-SpringCloud微服务部署</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t58">本地部署(2)-前端静态web网站</a></li></ol></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t59">环境准备(1)-Docker快速入门</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t60">Docker简介</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t61">环境准备(2)-Dockerﬁle镜像脚本快速入门</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t62">环境准备(3)-Harbor镜像仓库安装及使用</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t63">微服务持续集成(1)-项目代码上传到Gitlab</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t64">微服务持续集成(2)-从Gitlab拉取项目源码</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t65">微服务持续集成(3)-提交到SonarQube代码审查</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t66">微服务持续集成(4)-使用Dockerﬁle编译、生成镜像</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t67">微服务持续集成(5)-上传到Harbor镜像仓库</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t68">微服务持续集成(6)-拉取镜像和发布应用</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t69">微服务持续集成(7)-部署前端静态web网站</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t70">安装Nginx服务器</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t71">Jenkins安装NodeJS插件</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t72">创建前端流水线项目</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t73">5、Jenkins+Docker+SpringCloud微服务持续集成(下)</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t74">JK+Docker+Cloud部署方案优化</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t75">Jenkins+Docker+SpringCloud集群部署流程说明</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t76">完成微服务构建镜像，上传私服</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t77">完成微服务多服务器远程发布</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t78">Nginx+Zuul集群实现高可用网关</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t79">6、基于K8S构建Jenkins持续集成平台(上)</a></li><li class="sub-box"><ol><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t80">Jenkins的Master-Slave分布式构建</a></li><li class="sub-box"><ol><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t81">什么是Master-Slave分布式构建</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t82">如何实现Master-Slave分布式构建</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t83">Kubernetes实现Master-Slave分布式构建方案</a></li><li class="sub-box"><ol><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t84">传统Jenkins的Master-Slave方案的缺陷</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t85">Kubernates简介</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t86">Kubernates+Docker+Jenkins持续集成架构图</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t87">Kubernates+Docker+Jenkins持续集成方案好处</a></li></ol></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t88">Kubeadm安装Kubernetes</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t89">Kubernetes的架构</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t90">安装环境说明</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t91">设置系统参数</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t92">kube-proxy开启ipvs的前置条件</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t93">安装kubelet、kubeadm、kubectl</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t94">kubectl常用命令</a></li></ol></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t95">安装和配置NFS</a></li><li class="sub-box"><ol><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t96">NFS简介</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t97">NFS安装</a></li></ol></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t98">在Kubernetes安装Jenkins-Master</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t99">创建NFS client provisioner</a></li></ol></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t100">Jenkins与Kubernetes整合</a></li><li class="sub-box"><ol><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t101">安装Kubernetes插件</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t102">实现Jenkins与Kubernetes整合</a></li></ol></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t103">构建Jenkins-Slave自定义镜像</a></li><li><a href="https://blog.csdn.net/hancoder/article/details/118233786#t104">测试Jenkins-Slave是否可以创建</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t105">Jenkins+Kubernetes+Docker完成微服务持续集成</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t106">拉取代码，构建镜像</a></li><li class=""><a href="https://blog.csdn.net/hancoder/article/details/118233786#t107">微服务部署到K8S</a></li></ol></li></ol></li></ol></div>
                        </div>
                    </div>
                </div>
                </div>
            </div>
                <div id="recommendAdBox">
                    <div id="kp_box_479" data-pid="479"><script async="" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/f(8).txt"></script>
<!-- PC-博客详情页-右侧视窗（自适应） -->
<ins class="adsbygoogle" style="display: block; height: 600px;" data-ad-client="ca-pub-1076724771190722" data-ad-slot="3484057394" data-ad-format="auto" data-full-width-responsive="true" data-adsbygoogle-status="done" data-ad-status="filled"><ins id="aswift_0_expand" style="border: none; height: 600px; width: 300px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-table;" tabindex="0" title="Advertisement" aria-label="Advertisement"><ins id="aswift_0_anchor" style="border: none; height: 600px; width: 300px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: block; overflow: visible;"><iframe id="aswift_0" name="aswift_0" style="left:0;position:absolute;top:0;border:0;width:300px;height:600px;" sandbox="allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation" width="300" height="600" frameborder="0" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/ads.html" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" allowfullscreen="true" data-google-container-id="a!1" data-load-complete="true" data-google-query-id="CNft74a18fMCFaXVfAodxzgPHg"></iframe></ins></ins></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?p=479&amp;a=3267&amp;c=0&amp;k=&amp;spm=1001.2101.3001.4834&amp;d=1&amp;t=3&amp;u=644ce621fc834d8ea279a98bc335c2dd" style="display: block;width: 0px;height: 0px;" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/1.png"></div>
                </div>
            <div class="aside-box kind_person d-flex flex-column">
                    <h3 class="aside-title">分类专栏</h3>
                    <div class="align-items-stretch kindof_item" id="kind_person_column">
                        <div class="aside-content">
                            <ul>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_9577339.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_9577339.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/202103190233257.jpg" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="title oneline">
                                            <span class="text">Spring</span>
                                        </span>
                                        <span class="count float-right">32篇</span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_10344227.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_10344227.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210924010505854.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="title oneline">
                                            <span class="text">网络通信与OS</span>
                                        </span>
                                        <span class="count float-right">6篇</span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_10184847.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_10184847.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210319023443547.jpg" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="title oneline">
                                            <span class="text">源码解读</span>
                                        </span>
                                        <span class="count float-right">21篇</span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_10274700.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_10274700.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/2021092401070377.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="title oneline">
                                            <span class="text">多线程</span>
                                        </span>
                                        <span class="count float-right">8篇</span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_11140481.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_11140481.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210704200028250(1).png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="title oneline">
                                            <span class="text">k8s</span>
                                        </span>
                                        <span class="count float-right">13篇</span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_10822407.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_10822407.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210319023137910.jpg" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="title oneline">
                                            <span class="text">谷粒项目笔记</span>
                                        </span>
                                        <span class="count float-right">13篇</span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_11180472.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_11180472.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210704195812350.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="title oneline">
                                            <span class="text">Tomcat源码</span>
                                        </span>
                                        <span class="count float-right">7篇</span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_10345348.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_10345348.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210319023536204.jpg" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="title oneline">
                                            <span class="text">JVM</span>
                                        </span>
                                        <span class="count float-right">5篇</span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_9488515.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_9488515.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210319023640626.jpg" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="title oneline">
                                            <span class="text">数据库</span>
                                        </span>
                                        <span class="count float-right">16篇</span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_11133829.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_11133829.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20201014180756928.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="title oneline">
                                            <span class="text">java框架</span>
                                        </span>
                                        <span class="count float-right">3篇</span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_9494308.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_9494308.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20201014180756923.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="title oneline">
                                            <span class="text">linux与服务器</span>
                                        </span>
                                        <span class="count float-right">11篇</span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_9394898.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_9394898.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20201014180756738.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="title oneline">
                                            <span class="text">Java</span>
                                        </span>
                                        <span class="count float-right">23篇</span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_9490100.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_9490100.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20201014180756922.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="title oneline">
                                            <span class="text">mybatis</span>
                                        </span>
                                        <span class="count float-right">12篇</span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_10106944.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_10106944.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20201014180756925.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="title oneline">
                                            <span class="text">MVC</span>
                                        </span>
                                        <span class="count float-right">11篇</span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_10382538.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_10382538.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20201014180756738.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="title oneline">
                                            <span class="text">大数据框架</span>
                                        </span>
                                        <span class="count float-right">2篇</span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_10147715.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_10147715.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20201014180756780.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="title oneline">
                                            <span class="text">分布式</span>
                                        </span>
                                        <span class="count float-right">5篇</span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_10267240.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_10267240.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20201014180756922.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="title oneline">
                                            <span class="text">数据结构与刷题</span>
                                        </span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_7772521.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_7772521.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20201014180756928.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="title oneline">
                                            <span class="text">C++</span>
                                        </span>
                                        <span class="count float-right">11篇</span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_8697621.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_8697621.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20201014180756928.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="title oneline">
                                            <span class="text">深度学习</span>
                                        </span>
                                        <span class="count float-right">5篇</span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/hancoder/category_8824374.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/hancoder/category_8824374.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20201014180756913.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="title oneline">
                                            <span class="text">python</span>
                                        </span>
                                        <span class="count float-right">3篇</span>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
            </div>
        </div>
    </aside>
</div>

</div>
<div class="mask-dark"></div>
<script type="text/javascript">
    var timert = setInterval(function(){
      sideToolbar = $(".csdn-side-toolbar");
      if (sideToolbar.length > 0) {
        sideToolbar.css('cssText','bottom:64px !important;')
        clearInterval(timert);
      }
    }, 200);
</script>
<script>
    var articleId = 118233786;
    var commentscount = 4;
    var curentUrl = "https://blog.csdn.net/hancoder/article/details/118233786";
    var myUrl = "https://my.csdn.net/";
    var highlight = ["jenkins","持续集成","jen","ins","kin","实战","持续","je","环境","ns","集成","nk","【","】","续集"];//高亮数组
    var isRecommendModule = true;
    var isBaiduPre = true;
    var baiduCount = 2;
    var share_card_url = "https://app-blog.csdn.net/share?article_id=118233786&username=hancoder"
	var articleType = 1;
    var baiduKey = "【Jenkins】持续集成环境实战";
    var userNewReport = false;
    var needInsertBaidu = true;
    var recommendRegularDomainArr = ["blog.csdn.net/.+/article/details/","download.csdn.net/download/","edu.csdn.net/course/detail/","ask.csdn.net/questions/","bbs.csdn.net/topics/","www.csdn.net/gather_.+/"]
    var codeStyle = "tomorrow-night-eighties";
    var baiduSearchType = "title";
    var canRead = true;
    var blogMoveHomeArticle = false;
    var showPcWindowAd = false;
    var showHeadWord = true;
    var showSearchText = "";
    var linkPage = true;
    var articleSource = 1;
    var articleReport = '{"pid": "blog", "spm":"1001.2101"}';
    var isShowToQuestion = false;
    var baiduSearchChannel = 'pc_relevant'
    var baiduSearchIdentification = '.no_search_link'
    var distRequestId = '1635572142975_11827'
    var initRewardObject = {
        giver: currentUserName,
        anchor: username,
        articleId: articleId,
        sign: ''
    }
    var isLikeStatus = false;
    var isUnLikeStatus = false;
</script>
<script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/sandalstrap.min.js"></script>
<div class="skin-boxshadow"></div>
<div class="directory-boxshadow"></div>
<div class="pay-code">
    <div class="pay-money">实付<span class="pay-money-span" data-nowprice="" data-oldprice="">元</span></div>
    <div class="content-blance"><a class="blance-bt" href="javascript:;">使用余额支付</a></div>
    <div class="content-code">
    <div id="payCode" data-id="">
            <div class="renovate">
                <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/pay-time-out.png">
                <span>点击重新获取</span>
            </div>
        </div>
        <div class="pay-style"><span><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/weixin.png"></span><span><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/zhifubao.png"></span><span><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/jingdong.png"></span><span class="text">扫码支付</span></div>
    </div>
    <div class="bt-close"><svg t="1567152543821" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10924" xmlns:xlink="http://www.w3.org/1999/xlink" width="12" height="12"><defs><style type="text/css"></style></defs><path d="M512 438.378667L806.506667 143.893333a52.032 52.032 0 1 1 73.6 73.621334L585.621333 512l294.485334 294.485333a52.074667 52.074667 0 0 1-73.6 73.642667L512 585.621333 217.514667 880.128a52.053333 52.053333 0 1 1-73.621334-73.642667L438.378667 512 143.893333 217.514667a52.053333 52.053333 0 1 1 73.621334-73.621334L512 438.378667z" fill="" p-id="10925"></path></svg></div>
    <!-- <p style="margin-top: 8px;font-size: 14px;" class="text-center">支付成功即可阅读</p> -->
    <div class="pay-balance">
    <input type="radio" class="pay-code-radio" data-type="details"> 
    <span class="span">钱包余额</span>
    <span class="balance" style="color:#FC5531;font-size:14px;">0</span>  
    <div class="pay-code-tile">
        <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/pay-help.png" alt="">
        <div class="pay-code-content">
            <div class="span">
                <p class="title">抵扣说明：</p>
                <p> 1.余额是钱包充值的虚拟货币，按照1:1的比例进行支付金额的抵扣。<br> 2.余额无法直接购买下载，可以购买VIP、C币套餐、付费专栏及课程。</p>
            </div>
        </div>
    </div>
    </div>
    <a class="pay-balance-con" href="https://i.csdn.net/#/wallet/balance/recharge" target="_blank"><img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/recharge.png" alt=""><span>余额充值</span></a>
</div>
<div style="display:none;">
	<img src="https://blog.csdn.net/hancoder/article/details/118233786" onerror="setTimeout(function(){if(!/(csdn.net|iteye.com|baiducontent.com|googleusercontent.com|360webcache.com|sogoucdn.com|bingj.com|baidu.com)$/.test(window.location.hostname)){window.location.href=&quot;\x68\x74\x74\x70\x73\x3a\x2f\x2f\x77\x77\x77\x2e\x63\x73\x64\x6e\x2e\x6e\x65\x74&quot;}},3000);">
</div>

<script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/pc_wap_highlight-a6777dccd0.min.js" type="text/javascript"></script>
<script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/pc_wap_common-97cdfef25d.min.js" type="text/javascript"></script>
<script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/edit_copy_code-1320dfe85c.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/tomorrow-night-eighties.css">
<script>
 // 全局声明
 if (window.csdn === undefined) {
      window.csdn = {};
    }
    window.csdn.sideToolbar = {
        options: {
            report:{
                isShow: true,
            },
            qr: {
                isShow: false,
            },
            guide: {
                isShow: true
            }
        }
    }
    $(function(){
        $(document).on('click',"a.option-box[data-type='report']",function() {
            window.csdn.userLogin.loadAjax(function(res){
                if(userNewReport){
                     window.csdn.feedback({
                        "type":'blog',
                        "rtype":'article',
                        "rid":articleId,
                        "reportedName":username,
                        "submitOptions":{
                            "title":articleTitle,
                            "contentUrl":articleDetailUrl
                        },
                        "callback":function(){
                            showToast({
                                text: "感谢您的举报，我们会尽快审核！",
                                bottom: '10%', //toast距离页面底部的距离
                                zindex: 9000, //为了防止被其他控件遮盖，z-index默认为2
                                speed: 500, //toast的显示速度
                                time: 1500//toast显示多久以后消失
                            });
                        }
                     })
                }else{
                    showReport(false,articleTitles);
                }
            })
        });
    })
</script>
    <script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/baidu-search.js" type="text/javascript"></script>
<script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/qrcode.js"></script>
<script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/qrcode.min.js"></script>
<script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/user-ordercart.js" type="text/javascript"></script>
<script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/user-ordertip.js" type="text/javascript"></script>
<script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/order-payment.js" type="text/javascript"></script>
<script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/common-8738548423.min.js" type="text/javascript"></script>
<script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/detail-e4ad3765bf.min.js" type="text/javascript"></script>
<script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/column-9f6d8d8cba.min.js" type="text/javascript"></script>
<script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/side-toolbar.js" type="text/javascript"></script>
<script src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/copyright.js" type="text/javascript"></script>
<script>
    $(".MathJax").remove();
    if ($('div.markdown_views pre.prettyprint code.hljs').length > 0) {
        $('div.markdown_views')[0].className = 'markdown_views';
    }
</script>
<script type="text/javascript" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/MathJax.js"></script>
<script type="text/x-mathjax-config;executed=true">
    MathJax.Hub.Config({
            "HTML-CSS": {
                    linebreaks: { automatic: true, width: "94%container" },
                    imageFont: null
            },
            tex2jax: {
                preview: "none",
                ignoreClass:"title-article"
            },
            mml2jax: {
                preview: 'none'
            }
    });
</script>
<script type="text/javascript" crossorigin="" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/csdn-login-box.js"></script>
<div id="pointDivs"><div class="point-outer point-pre"><div class="point-inner"></div></div><div class="point-outer point-pre"><div class="point-inner"></div></div><div class="point-outer point-pre"><div class="point-inner"></div></div><div class="point-outer point-pre"><div class="point-inner"></div></div><div class="point-outer point-pre"><div class="point-inner"></div></div></div><div id="st_mask" onclick="closeMask()" style="width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); position: fixed; left: 0px; top: 0px; display: none; z-index: 1;"></div><div id="st_confirmBox" style="width: 100%; position: fixed; left: 0px; top: 34%; text-align: center; display: none; z-index: 2;"><div id="st_confirm" style="width: 80%; margin: 0px auto; background: rgb(255, 255, 255); border-radius: 3px; overflow: hidden; padding-top: 20px; text-align: center;"><span id="st_confirm_text" style="background: rgb(255, 255, 255); overflow: hidden; padding: 15px 8px 30px; text-align: center; display: block;"></span><span class="st_confirm_btn cancel" style="background: rgb(255, 255, 255); color: rgb(141, 141, 141); padding: 8px; text-align: center; display: block; width: 50%; margin: 0px auto; float: left; box-sizing: border-box; border-top: 1px solid rgb(207, 207, 207); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"></span><span class="st_confirm_btn success" style="background: rgb(27, 121, 248); color: rgb(255, 255, 255); padding: 8px; text-align: center; display: block; width: 50%; margin: 0px auto; float: left; box-sizing: border-box; border-top: 1px solid rgb(27, 121, 248); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"></span><div style="clear: both; display: block;"></div></div></div><div id="st_alertBox" style="width: 100%; position: fixed; left: 0px; top: 34%; text-align: center; display: none; z-index: 2;"><div id="st_alert" style="width: 80%; margin: 0px auto; background: rgb(255, 255, 255); border-radius: 2px; overflow: hidden; padding-top: 20px; text-align: center;"><span id="st_alert_text" style="background: rgb(255, 255, 255); overflow: hidden; padding: 15px 8px 30px; text-align: center; display: block;"></span><span id="st_alert_btn" onclick="closeMask()" style="background: rgb(27, 121, 248); color: rgb(255, 255, 255); padding: 8px; text-align: center; display: block; width: 72%; margin: 0px auto 20px; border-radius: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"></span></div></div><div id="st_toastBox" style="width: 100%; position: fixed; left: 0px; bottom: 10%; text-align: center; display: none;"><span id="st_toastContent" style="color: rgb(255, 255, 255); background: rgba(0, 0, 0, 0.8); padding: 8px 24px; border-radius: 4px; max-width: 80%; display: inline-block; font-size: 16px;"></span></div> <div class="report-box">  <div class="pos-boxer">      <div class="pos-content">          <div class="box-title">              <p>举报</p>              <img class="icon btn-close" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/closeBlack.png">          </div>          <div class="box-header">              <div class="box-top"><span>选择你想要举报的内容（必选）</span></div>              <div class="box-botoom">                  <ul>                      <li data="1" type="nei">内容涉黄</li>                      <li data="2" type="nei">政治相关</li>                      <li data="3" type="nei">内容抄袭</li>                      <li data="4" type="nei">涉嫌广告</li>                      <li data="5" type="nei">内容侵权</li>                      <li data="6" type="nei">侮辱谩骂</li>                      <li data="8" type="nei">样式问题</li>                      <li data="7" type="nei">其他</li>                  </ul>              </div>          </div>          <div>          <div class="box-content">          </div>          <div class="box-content">          </div>                    <div class="box-content" style="display:none;">                  <div class="box-content-top">                          <span>原文链接（必填）</span>                      </div>                      <div class="box-content-bottom" style="padding-bottom: 16px;">                        <div class="box-input" style="height: 32px;line-height: 32px;">                        <input class="content-input" type="text" id="originalurl" name="originalurl" placeholder="请输入被侵权原文链接">                        </div>                      </div>          </div>          <div class="box-content">          </div>          <div class="box-content" style="display:none;">                  <div class="box-content-top">                          <span>请选择具体原因（必选）</span>                      </div>                  <div class="box-content-bottom">                          <ul>                              <li sub_type="1">包含不实信息</li>                              <li sub_type="2">涉及个人隐私</li>                          </ul>                      </div>          </div>          <div class="box-content" style="display:none;">                  <div class="box-content-top">                          <span>请选择具体原因（必选）</span>                      </div>                  <div class="box-content-bottom">                          <ul>                              <li sub_type="1">侮辱谩骂</li>                              <li sub_type="2">诽谤</li>                          </ul>                  </div>          </div>          <div class="box-content" style="display:none;">                <div class="box-content-top">                        <span>请选择具体原因（必选）</span>                    </div>                <div class="box-content-bottom">                        <ul>                            <li sub_type="1">搬家样式</li>                            <li sub_type="2">博文样式</li>                        </ul>                </div>          </div>          <div class="box-content" style="display:none;">          </div>          </div>            <div id="cllcont" style="display:none;">            <div class="box-content-top">              <span class="box-content-span">补充说明（选填）</span>            </div>                <div class="box-content-bottom">                  <div class="box-input">                    <textarea class="ipt ipt-textarea" style="padding:0;" name="description" placeholder="请详细描述您的举报内容"></textarea>                  </div>                </div>            </div>            </div>      <div class="pos-footer">          <p class="btn-close">取消</p>          <p class="box-active">确定</p>      </div>  </div></div><div class="imgViewDom disnone" style="display: none;"><img src="https://blog.csdn.net/hancoder/article/details/118233786"></div><style>.imgViewDom{display:none;position:fixed;top:0;left:0;height:100%;width:100%;z-index:99999999;background: rgba(255, 255, 255,0.8);overflow: auto;display:-webkit-box;-webkit-box-align:center;-webkit-box-pack:center;display:-moz-box;-moz-box-align:center;-moz-box-pack:center;display:-o-box;-o-box-align:center;-o-box-pack:center;display:-ms-box;-ms-box-align:center;-ms-box-pack:center; display:box;box-align:center;box-pack:center;}.imgViewDom img{cursor: zoom-out;}</style><svg aria-hidden="true" style="position: absolute; width: 0px; height: 0px; overflow: hidden;"><symbol id="sousuo" viewBox="0 0 1024 1024"><path d="M719.6779726 653.55865555l0.71080936 0.70145709 191.77828505 191.77828506c18.25658185 18.25658185 18.25658185 47.86273439 0 66.12399318-18.26593493 18.26125798-47.87208744 18.26125798-66.13334544 0l-191.77828505-191.77828506c-0.2338193-0.2338193-0.4676378-0.4676378-0.69678097-0.71081014-58.13206223 44.25257003-130.69075187 70.51978897-209.38952657 70.51978894C253.06424184 790.19776156 98.14049639 635.27869225 98.14049639 444.17380511S253.06424184 98.14049639 444.16912898 98.14049639c191.10488633 0 346.02863258 154.92374545 346.02863259 346.02863259 0 78.6987747-26.27189505 151.25746514-70.51978897 209.38952657z m-275.50884362 43.11621045c139.45428506 0 252.50573702-113.05145197 252.50573702-252.50573702s-113.05145197-252.50573702-252.50573702-252.50573783-252.50573702 113.05145197-252.50573783 252.50573783 113.05145197 252.50573702 252.50573783 252.50573702z"></path></symbol><symbol id="gonggong_csdnlogo_" viewBox="0 0 4096 1024"><path d="M1234.16069807 690.46341551c62.96962316 23.02318413 194.30703694 45.91141406 300.51598128 45.91141406 114.44114969 0 178.13952547-31.68724287 183.2407937-80.86454822 4.642424-44.8587714-42.21366937-50.93170978-171.44579784-81.53931916-178.57137886-43.77913792-292.49970264-111.55313011-281.32549604-219.86735976 12.9825927-125.75031047 181.27046257-220.78504823 439.49180199-220.78504822 125.88526465 0 247.93783044 8.87998544 311.17736197 29.60894839l-21.7006331 158.57116851c-41.05306337-14.27815288-198.1937175-34.11641822-304.48363435-34.11641822-107.7744129 0-163.56447339 33.90049151-167.42416309 71.06687432-4.85835069 47.04502922 51.14763648 49.23128703 191.14910897 86.50563321 189.58364043 48.09767188 272.47250144 115.81768239 261.6221849 220.81203906-12.71268432 123.51007099-164.13128096 228.53141851-466.48263918 228.53141851-125.85827383 0-234.33444849-22.96920244-294.09216204-45.93840492l19.730302-157.86940672zM3010.8325562 172.75216735c688.40130256-129.79893606 747.80813523 103.42888812 726.53935551 309.80082928l-40.08139323 381.78539207h-218.51781789l36.57258439-348.20879061c7.90831529-76.68096846 57.13960232-226.66905073-180.54170997-221.05495659-82.26807176 1.99732195-123.05122675 13.2794919-123.05122677 13.27949188s-7.15257186 92.65954408-15.81663059 161.13529804l-41.43093509 394.84895728h-214.3072473l42.53755943-389.15389062 28.09746151-302.43233073z m-869.48282929-18.05687008c49.12332368-5.34418577 124.58970448-10.76934404 228.45044598-10.76934405 173.38913812 0 313.57954648 30.17575597 400.38207891 93.63121421 77.94953781 59.16391512 129.82592689 154.95439631 115.4668015 293.74128117-13.25250106 129.15115596-80.405704 219.57046055-178.16651631 275.4954752-89.44763445 52.74009587-202.16137055 75.27744492-371.66382812 75.27744493-99.94707012 0-195.27870708-5.39816743-267.77609576-16.14052064L2141.37671774 154.69529727z m143.26736381 569.85754561c16.70732823 3.23890047 38.67786969 6.45081009 81.99816339 6.45081009 173.44311979 0 295.7386031-85.23706385 308.01943403-205.07638097 17.84094339-173.2271931-90.63523129-233.79463176-273.39018992-232.74198912-23.67096422 0-56.57279475 0-73.98188473 3.1849188l-42.6725136 428.15565036z" fill="#262626"></path><path d="M1109.8678928 870.30336371c-41.10704503 14.25116203-126.26313639 23.96786342-245.23874671 23.96786342-342.13585224 0-526.8071603-160.59548129-504.97157302-372.90540663C385.78470347 268.40769434 659.36382925 126.08500985 958.9081404 126.08500985c116.00661824 0 184.32042718 9.33882968 248.31570215 24.99351522l-20.5400271 170.42014604c-42.56455024-14.33213455-142.32268451-27.50366309-223.07926938-27.50366311-176.25016686 0-325.94134993 52.49717834-343.10752238 218.57179958-15.30380469 148.50358623 89.7715245 219.48948804 288.04621451 219.48948804 69.0155707 0 170.77102691-9.8786464 217.81605614-24.15679928l-16.49140154 162.40386737z" fill="#CA0C16"></path></symbol><symbol id="gonggong_csdnlogodanse_" viewBox="0 0 4096 1024"><path d="M1229.41995733 690.46341551c62.96962316 23.02318413 194.30703694 45.91141406 300.51598128 45.91141406 114.44114969 0 178.13952547-31.68724287 183.2407937-80.86454822 4.642424-44.8587714-42.21366937-50.93170978-171.44579784-81.53931916-178.57137886-43.77913792-292.49970264-111.55313011-281.32549604-219.86735976 12.9825927-125.75031047 181.27046257-220.78504823 439.49180199-220.78504822 125.88526465 0 247.93783044 8.87998544 311.17736197 29.60894839l-21.7006331 158.57116851c-41.05306337-14.27815288-198.1937175-34.11641822-304.48363435-34.11641822-107.7744129 0-163.56447339 33.90049151-167.42416309 71.06687432-4.85835069 47.04502922 51.14763648 49.23128703 191.14910897 86.50563321 189.58364043 48.09767188 272.47250144 115.81768239 261.6221849 220.81203906-12.71268432 123.51007099-164.13128096 228.53141851-466.48263918 228.53141851-125.85827383 0-234.33444849-22.96920244-294.09216204-45.93840492l19.730302-157.86940672zM3006.09181546 172.75216735c688.40130256-129.79893606 747.80813523 103.42888812 726.53935551 309.80082928l-40.08139323 381.78539207h-218.51781789l36.57258439-348.20879061c7.90831529-76.68096846 57.13960232-226.66905073-180.54170997-221.05495659-82.26807176 1.99732195-123.05122675 13.2794919-123.05122677 13.27949188s-7.15257186 92.65954408-15.81663059 161.13529804l-41.43093509 394.84895728h-214.3072473l42.53755943-389.15389062 28.09746151-302.43233073z m-869.48282929-18.05687008c49.12332368-5.34418577 124.58970448-10.76934404 228.45044598-10.76934405 173.38913812 0 313.57954648 30.17575597 400.38207891 93.63121421 77.94953781 59.16391512 129.82592689 154.95439631 115.4668015 293.74128117-13.25250106 129.15115596-80.405704 219.57046055-178.16651631 275.4954752-89.44763445 52.74009587-202.16137055 75.27744492-371.66382812 75.27744493-99.94707012 0-195.27870708-5.39816743-267.77609576-16.14052064L2136.635977 154.69529727z m143.26736381 569.85754561c16.70732823 3.23890047 38.67786969 6.45081009 81.99816339 6.45081009 173.44311979 0 295.7386031-85.23706385 308.01943403-205.07638097 17.84094339-173.2271931-90.63523129-233.79463176-273.39018992-232.74198912-23.67096422 0-56.57279475 0-73.98188473 3.1849188l-42.6725136 428.15565036z m-1174.74919792 145.75052083c-41.10704503 14.25116203-126.26313639 23.96786342-245.23874671 23.96786342-342.13585224 0-526.8071603-160.59548129-504.97157303-372.90540663C381.04396273 268.40769434 654.62308851 126.08500985 954.16739966 126.08500985c116.00661824 0 184.32042718 9.33882968 248.31570215 24.99351522l-20.5400271 170.42014604c-42.56455024-14.33213455-142.32268451-27.50366309-223.07926938-27.50366311-176.25016686 0-325.94134993 52.49717834-343.10752238 218.57179958-15.30380469 148.50358623 89.7715245 219.48948804 288.04621451 219.48948804 69.0155707 0 170.77102691-9.8786464 217.81605614-24.15679928l-16.49140154 162.40386737z"></path></symbol><symbol id="xieboke1" viewBox="0 0 1024 1024"><path d="M204.70021457 751.89799169h657.99199211a33.6932867 33.6932867 0 0 1 0 67.33536736H163.68452703a33.53966977 33.53966977 0 0 1-18.74125054-5.68382181c-18.63883902-9.4218307-18.17798882-29.44322156-15.20806401-39.17228615C199.0675982 570.27171976 309.41567149 409.58853908 435.38145354 290.12586836A243.22661203 243.22661203 0 0 1 536.97336934 234.20935065c138.10150976-33.79569759 228.3257813-29.95527721 318.60125827-28.52152054-17.15387692 20.48224105-36.20236071 41.6301547-57.29906892 62.93168529-3.1747472 3.22595323-164.67721739 19.91897936-187.97576692 47.05794871-23.29854894 27.13896932 129.60138005 7.37360691 125.19769798 11.11161576-21.6599699 18.33160576-44.90731339 36.4071831-69.94685287 53.8682939-4.50609297 3.1747472-149.52035944-0.35843931-174.61110436 27.85584737-25.19315641 28.16308124 101.89914903 18.12678338 96.0617103 21.40394206-67.43777825 37.63611797-125.96578207 64.62147036-212.70807253 93.8086635-57.65750823 19.4069231-121.8181284 133.13456658-146.5504346 179.06599187a435.75967738 435.75967738 0 0 0-23.04252112 49.10617311z" fill="#CA0C16"></path></symbol><symbol id="gitchat" viewBox="0 0 1024 1024"><path d="M892.08971773 729.08552746h-108.597062v-162.89559374H403.40293801v-108.59706198h488.68677972v271.49265572z m-651.58237345 54.298531V783.49265572h488.68678045v108.59706201H131.91028227V131.91028227h760.17943546v217.19412473h-108.597062V240.50734428H240.50734428v542.87671418z m542.98531145 0h108.597062v108.59706199h-108.597062v-108.59706199z" fill="#FF9100"></path></symbol><symbol id="toolbar-memberhead" viewBox="0 0 1303 1024"><path d="M1061.51168438 433.79527648A78.51879902 78.51879902 0 1 1 1129.35192643 472.74060007h-1.80593246l-48.05350474 403.97922198c-4.55409058 38.16013652-39.41643684 67.133573-80.79584389 67.13357302H319.35199503c-41.30088817 0-76.00619753-28.81639958-80.717325-66.97653526L189.01078861 472.74060007H187.12633728a78.51879902 78.51879902 0 1 1 67.76172401-38.86680556l193.31328323 119.81968805 158.13686148-336.06046024A78.5973179 78.5973179 0 0 1 658.23913228 80.14660493a78.51879902 78.51879902 0 0 1 51.58685077 137.721974l158.13686147 335.82490362 193.54883986-119.89820607z" fill="#FDD840"></path><path d="M1050.8331274 394.22180104a78.51879902 78.51879902 0 1 1 78.51879903 78.51879903h-1.80593246l-48.05350474 403.97922198c-4.55409058 38.16013652-39.41643684 67.133573-80.79584389 67.13357302H659.02432018C658.47468805 793.25433807 658.23913228 505.32590231 658.23913228 80.14660493a78.51879902 78.51879902 0 0 1 51.58685077 137.721974l158.13686147 335.82490362 193.54883986-119.89820607A78.51879902 78.51879902 0 0 1 1050.8331274 394.22180104z" fill="#FFBE00"></path></symbol><symbol id="toolbar-m-memberhead" viewBox="0 0 1303 1024"><path d="M1062.74839935 433.79527648A78.51879902 78.51879902 0 1 1 1130.58864141 472.74060007h-1.80593246l-48.05350474 403.97922198c-4.55409058 38.16013652-39.41643685 67.133573-80.79584389 67.13357302H320.58871c-41.30088817 0-76.00619753-28.81639958-80.71732499-66.97653526L190.24750358 472.74060007H188.36305226a78.51879902 78.51879902 0 1 1 67.761724-38.86680556l193.31328324 119.81968805 158.13686147-336.06046024A78.5973179 78.5973179 0 0 1 659.47584726 80.14660493a78.51879902 78.51879902 0 0 1 51.58685076 137.721974l158.13686148 335.82490362 193.54883985-119.89820607z" fill="#D6D6D6"></path><path d="M1052.06984238 394.22180104a78.51879902 78.51879902 0 1 1 78.51879903 78.51879903h-1.80593246l-48.05350474 403.97922198c-4.55409058 38.16013652-39.41643685 67.133573-80.79584389 67.13357302H660.26103515C659.71140302 793.25433807 659.47584726 505.32590231 659.47584726 80.14660493a78.51879902 78.51879902 0 0 1 51.58685076 137.721974l158.13686148 335.82490362 193.54883985-119.89820607A78.51879902 78.51879902 0 0 1 1052.06984238 394.22180104z" fill="#C1C1C1"></path></symbol><symbol id="csdnc-upload" viewBox="0 0 1024 1024"><path d="M216.37466416 723.16095396v84.46438188h591.25067168v-84.46438188c0-23.32483876 18.90735218-42.23219094 42.23219093-42.23219021s42.23219094 18.90735218 42.23219096 42.23219021v84.46438188c0 46.64967827-37.81470362 84.46438188-84.46438189 84.46438189H216.37466416c-46.64967827 0-84.46438188-37.81470362-84.46438189-84.4643819v-84.46438187c0-23.32483876 18.90735218-42.23219094 42.23219096-42.23219021s42.23219094 18.90735218 42.23219094 42.23219021zM469.76780906 275.55040991L246.55378774 499.53305726a42.30820888 42.30820888 0 0 1-59.99082735 0c-16.56346508-16.62259056-16.56346508-43.57095155 0-60.19354139L480.51167818 144.38144832A42.21952103 42.21952103 0 0 1 512 131.93984464a42.20262858 42.20262858 0 0 1 31.48409853 12.44160369l293.95294108 294.95806754c16.56346508 16.62259056 16.56346508 43.57095155 0 60.19354139a42.30820888 42.30820888 0 0 1-59.99082735 0L554.23219094 275.55040991V680.92876375c0 23.32483876-18.90735218 42.23219094-42.23219094 42.23219021s-42.23219094-18.90735218-42.23219094-42.23219021V275.55040991z"></path></symbol></svg><div>
  <div class="csdn-side-toolbar " style="bottom: 64px !important; left: 1753.5px;"><div class="csdn-common-logo-advert">
      <img class="logo-advert-close" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20210812043922.png">
      <img class="logo-advert-back" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20211018040038.png">
      <div class="logo-advert-bubble ">
       <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/20211018040042.png">
      </div>
    </div>
    
    <a class="option-box" data-type="guide">
      <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/guide.png" alt="" srcset="">
      <span class="show-txt">新手<br>引导</span>
    </a>
    
    
    
    
    <a class="option-box" data-type="cs">
      <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/kefu.png" alt="" srcset="">
      <span class="show-txt">客服</span>
    </a>
    
    
    
    <a class="option-box" data-type="report">
      <span class="show-txt" style="display:flex;opacity:100;">举报</span>
    </a>
    
    
    <a class="option-box" data-type="gotop">
      <img src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/fanhuidingbucopy.png" alt="" srcset="">
      <span class="show-txt">返回<br>顶部</span>
    </a>
    
  </div>
  </div><iframe src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/aframe.html" width="0" height="0" style="display: none;"></iframe></body><iframe id="google_esf" name="google_esf" src="./【Jenkins】持续集成环境实战_努力充实，远方可期-CSDN博客_files/zrt_lookup.html" style="display: none;"></iframe></html>